Djokovic – who is bidding to equal Roger Federer's record of six ATP Finals titles – sealed his spot in the last four by beating Andrey Rublev on Wednesday, but he was in no mood to do the already-eliminated Medvedev any favours in Turin.
The 21-time grand slam winner dominated the opening set, winning 89 per cent of points behind his first serve and hitting several outstanding cross-court forehand winners.
Djokovic began the second set in similar fashion, but saw his standards dip when he returned to the court following a long stoppage at 5-5.
The rejuvenated Medvedev forced a tie-break with a delightful drop shot before taking advantage of a rare double fault from Djokovic to level the match.
With the exhausted Djokovic visibly shaking ahead of the decider and his semi-final against Taylor Fritz looming, the Serbian's commitment to Friday's dead rubber could have been called into question, but he found a second wind to take the match away from Medvedev.
Djokovic was on the ropes when he saw his serve broken for the first time in the tournament nine games into the third set, but he hit back immediately and then forced another tie-break.
The Serbian was back to his exquisite best from there on as he sealed the win by hitting a huge forehand winner down the line, though the drawn-out nature of his victory could yet play into Fritz's hands.