The top-ranked Serb, who has won the tournament twice, looked out of sorts and produced 47 unforced errors.
Defending champion Rafael Nadal was not doing his best, either. But the second-ranked Spaniard rallied from 4-1 down against unseeded Guido Pella to win 7-6 (1), 6-3 and move closer to a record-gaining 12th title here.
Nadal imperiously won last year without conceding more than four games in a set. So Pella will have regrets, considering he was serving for a 5-1 first-set lead when he double-faulted.
Although Nadal won the next four games to level at 5-5, he dropped his wayward serve again. It gave Pella the chance to become the first player to take a set against him here since Britain’s Kyle Edmund in the second round two years ago.
Pella reached 30-30 but Nadal broke back and forced a tiebreaker — his first here since a third-round win against John Isner in 2015.
Although Nadal was broken to love serving for the match, Pella could not hold his serve, either.
He saved one match point at 15-40 down but then double-faulted. After 2 hours, 20 minutes on court a relieved Nadal hugged his opponent at the net.
The last time Nadal failed to reach the last four here was in 2014, when he lost to countryman David Ferrer in the last eight.
Nadal next plays No. 9 Borna Coric of Croatia or No.13 Fabio Fognini of Italy. They were playing their quarterfinal later Friday.The 14th-ranked Medvedev is chasing a fifth career title.