He did so after fourth-ranked Medvedev tamed self-styled "wild horse" Fabio Fognini 6-3, 7-6 (7/4) to canter into the semi-finals.
A single break was enough for Djokovic to serve out the first set, but the 32-year-old Serb's performance wavered in the second.
Djokovic, the defending champion, will next play Greek sixth seed Stefanos Tsitsipas who beat Poland's Hubert Hurkacz 7-5 3-6 7-6 (5) in the only three-setter of the day.
"I was a bit fortunate to win that first set but I played okay and I fought extremely hard".
Towards the end of the match, Djokovic was serving incredibly well - winning his last two service games to love.
The market suggests, and my model agrees, that it's going to take more than this to beat Djokovic tomorrow, and Novak is likely going to have a real off-day if Tsitsipas is to cause a shock result.
The world No.7 remained persistent and patient in lengthy exchanges to find the match-winning opportunity in the third set.
"The first set was certainly crucial to put me in the lead".
Global Fund raises £11bn to fight Aids, TB and malaria
In his opening speech, Mr Macron said: "If we meet our commitments in the next three years, 16 million lives can be saved". French President Emmanuel Macron took time to shake hands with Zambia's Health Minister, Hon.
Iran lifts 40-year ban on women entering football stadiums
Iranian women will officially be able to enter and watch a men's soccer match for the first time in decades on Thursday. Tickets for Thursday's match between Iran and Cambodia at Tehran's 78,000-capacity Azadi Stadium have already sold out.
Turkey to begin Syria offensive 'shortly' despite mixed United States signals
A photograph released to Turkish media showed Erdogan at his desk, reportedly giving orders for the start of the operation. Trump said at the time that the Kurds "fought with us" and "died with us", and insisted that America would never forget.
Tsitsipas also earned a place at the year-end ATP Finals for the first time on Friday.
Medvedev - another of the next generation - sent down 12 aces to help see off Fognini and said: "I don't know what happened, my serve was crushing it".
Italy's Matteo Berrettini faces Dominic Thiem after beating Spain's Roberto Bautista Agut 7-6 (5) 6-4.
Federer committed 40 unforced errors but saved five set points in the opening set.
"I never really felt like I had the upper hand over David today", Federer said.
The Swiss second seed will be up against German fifth seed Alexander Zverev, who dispatched Andrey Rublev 6-0 7-6 (4) in 84 minutes.
I thought he took really a lot of good decisions, and he was super fast on his feet today, which I think made it really hard for me to get my freebies and winners off the baseline, because he was getting to all of them.