Nadal’s straight-sets victory means he establishes a new Open era best for consecutive sets won on a single surface, passing McEnroe’s 49 on carpet in 1984.
McEnroe also won the Madrid Open Indoor title that year and Nadal may be about to follow suit in the Spanish capital, with Austrian Dominic Thiem up next in the quarter-finals on Friday.
His unbeaten run is also perhaps a reflection of a lack of rivals, with Roger Federer, Novak Djokovic and Andy Murray, for different reasons, all posing little threat on clay over the past year.
“When my career is over, these are things that are going to be there forever,” Nadal said.
“They are big records. It’s difficult to be able to win 50 sets in a row. But I’ve done it. It’s over.
“Let’s not talk about that any more and let’s focus on what we have ahead.”
Del Potro, however, will not join him in the last eight. The Argentinian led 4-0 in a third-set tie-break but still lost 3-6, 6-4, 7-6 (8/6) to Serbian qualifier Dusan Lajovic.
Lajovic will now face South Africa’s Kevin Anderson, who overcame Philipp Kohlschreiber.
“I think I can improve a lot of things towards Rome and Roland Garros,” Del Potro said. “I can level up my game. Right now I’m quite calm.”
Sharapova also lost in three sets to Kiki Bertens of the Netherlands while Halep, the champion in 2016 and 2017, was blown away by Karolina Pliskova.
It means Pliskova, the sixth seed, is the highest-ranked player left in the women’s draw after Caroline Wozniacki, Garbine Muguruza, Elina Svitolina and Jelena Ostapenko all lost earlier in the week.
Pliskova’s 6-4, 6-3 win sets up a semi-final showdown with two-time Wimbledon champion Petra Kvitova, who saw off Russia’s Daria Kasatkina.
“Even in the warm-up I felt so good today,” Pliskova said.
“I think I played one of my best matches this year for sure, and for sure on clay in my life.”Halep said: “Today she didn’t miss. I didn’t play badly in my opinion.
“I missed in some important moments, that’s why it went her way but I’m not very disappointed about this match. She deserved to win.”
The Russian arrived on the back of four consecutive defeats but three victories and a narrow 4-6, 6-2, 6-3 loss to Bertens suggests she could be a threat at the French Open later this month.
“It was great to get those wins against those players,” said Sharapova, the 2014 champion in Madrid.
“But there’s a reason I came up short today. You also want to evaluate that and go back to the drawing board and start over again.”
Bertens, meanwhile, will now face France’s Caroline Garcia, who eased past Carla Suarez Navarro 6-2, 6-3.
Novak Djokovic’s conqueror, Kyle Edmund, maintained his strong run with a comfortable 6-3, 6-3 win over eighth seed David Goffin.
Edmund will face Denis Shapovalov, who came through his all-Canadian clash with Milos Raonic, 6-4, 6-4.
Second seed Alexander Zverev beat Argentina’s Leonardo Mayer and will now take on John Isner, who beat Pablo Cuevas.