He was India captain Rohit Sharma's opening partner in the home T20 series against Afghanistan earlier this year but his place looked under threat as he struggled for runs in the IPL
The Serbian, who won a singles bronze in Beijing in 2008 but failed to earn a podium place at the London, Rio and now Tokyo, withdrew from the mixed doubles bronze medal match minutes after his defeat by Spain's Pablo Carreno Busta in the singles bronze medal match.
Djokovic lost to Germany's Alexander Zverev on Friday in the singles semi-finals, ending his hopes of this year winning a 'Golden Slam', which is Olympic gold and all four Grand Slams.
His withdrawal from the mixed doubles means Ash Barty and John Peers bag a bronze medal for Australia.