Medvedev, seeded fifth, will now meet top seed Jannick Sinner in the quarterfinals.
The Russian has a 6-5 head-to-head lead over the Italian world No.1 but has lost their last five matches.
Dimitrov looked in good form, racing to a 3-0 lead in the match, before Medvedev broke back.
The Bulgarian then slipped on Court One, carrying on for a couple of games that Medvedev won before taking a medical time out after the seventh.
He returned briefly but could not move well and called it a day after the eighth game during which Medvedev served three aces.
--Reuters—