The 26-year-old Zverev led 5:2 in the third set, but was unable to win the match, and his rival from Murcia made up for it in an unheard-of standard shorthand.
The fourth game was close to 4:4 with one lost service game each, but then Alcaraz could not bring his serve back, and Zverev then ended the match, which lasted three hours and eight minutes.
The Olympic and ATP world champion Zverev can prepare for his seventh Grand Slam semifinal, in which the Russian Daniil Medvedev awaits him.
On the other side, the world number one and defending champion Novak Djokovic will fight for the final with the Italian Jannik Sinner.
Results, quarter finals:
men:
Zverev (German, 6th)-Alcaraz (Spain, 2nd) 6:1, 6:3, 6:7 (2-7), 6:4
previously:
Medvedev (Russian, 3rd)-Hurkacz (Polish, 9th) 7:6 (7-4), 2:6, 6:3, 5:7, 6:4
Semi-final pairing:
Medvedev-Zverev, Djokovic (Serbian, 1st)-Sinner (Italian, 4th)