Nadal, 31, beat Argentine Diego Schwartzman 6-3 6-4 on clay to take his winning streak to 50 sets in a row.
He will play Austria’s Dominic Thiem on Friday for a place in the last four.
American McEnroe’s 49-set winning run came on carpet in 1984 and included him clinching the Madrid Indoor Open title.
Nadal’s 50 sets have included tournament wins in Barcelona, Monte Carlo and last year’s French Open.
The Spaniard, looking for a sixth Madrid Open title, faced a minor scare as Schwartzman broke back to make it 4-4 in the second, before Nadal responded immediately and closed out for the match.