Defending champion Carlos Alcaraz survived a scare against Jan-Lennard Struff to reach the last-eight.
In a repeat of last year's final, Spain's Alcaraz was forced to a deciding set tie-break by the German 23rd seed, after missing out on four match points at 5-3.
But the world number three prevailed in front of a home crowd to wrap up a 6-3 6-7 (5-7) 7-6 (7-4) win after almost three hours.
Alcaraz won the last two editions of the Madrid Open and is on a 14-match winning streak in the Spanish capital.
The 20-year-old will face Russian seventh seed Andrey Rublev, who beat Dutchman Tallon Griekspoor 6-2 6-4 earlier on Tuesday.
Meanwhile, Italian top seed Jannik Sinner remains on course for his fourth title of 2024 after beating Karen Khachanov 5-7 6-3 6-3.
The Australian Open champion reacted well to dropping his first set of the tournament before setting up a last-eight meeting Canada's Auger-Aliassime who claimed a surprise win over Norway's in-form Casper Ruud.
German fourth seed Alexander Zverev, the 2021 champion, fell to a 6-3 6-4 defeat by Francisco Cerundolo.
The Argentine 11th seed will play America's Taylor Fritz in the quarter-finals after the 12th seed saw off Hubert Hurkacz of Poland in straight sets.
BBC