Medvedev and Alcaraz will now face one another in the men’s singles semi-finals on Friday.
Medvedev overcame a struggling Sinner to dump the top seed out of the tournament and reach a second-consecutive semi-final.
The fifth seed, who has now matched his best Wimbledon run from last year, said: “I knew if I want to beat Jannik, it needed to be a tough match. I felt at one moment he was not feeling that good but I knew it could still get away. It was great points, great match, and I’m really happy
Sinner appeared to be feeling unwell, holding his head in his hands after calling the doctor early in the third set, and being helped off court for a medical time-out.
A possible retirement looked on the cards but Sinner gradually improved on the resumption and may have won the match had he taken one of two set points in the third.
He managed to forced a deciding set but it was Medvedev who eventually claimed a 6-7 (9-7) 6-4 7-6 (7-4) 2-6 6-3 victory after exactly four hours to set up a clash with defending champion Alcaraz.