Nadal, who had never before retired from a U.S. Open match, showed signs of distress almost from the start as he limped noticeably after a gruelling 69-minute opening set.
He called for the trainer during the changeover on serve at 2-1 in the second.
The defending champion had his knee massaged and re-taped and bravely continued through the second set before telling the umpire he was unable to continue.
Nadal’s stamina and famous fitness have been put to the test on the sweltering Flushing Meadows hardcourts as he has logged nearly 16 hours through five matches.
The Spaniard was made to work for his place in the last four, needing a fifth set tiebreak to see off Dominic Thiem in the quarters.
It was the second time this year that the world number one has retired from a slam as he also quit during his quarter-final against Marin Cilic at the Australian Open in January.