Nadal retired injured from a Grand Slam match for the second time this year, having also pulled out of his Australian Open quarter-final against Marin Cilic in January
Juan Martin del Potro will compete in his first Grand Slam final for nine years after defending champion Rafael Nadal retired from their US Open semi-final.
Argentine third seed Del Potro was leading 7-6 (7-3) 6-2 when Nadal quit because of a knee problem.
Top seed Nadal, 32, twice needed medical attention before conceding.
"It was difficult for me to keep playing. I was in too much pain and it was not a tennis match," said Nadal.
"It was one player playing and one on the other side of the court.
"I hate retiring but to stay one more set out there playing like that is too much for me."
Del Potro, the 2009 champion, will face Serbia's Novak Djokovic in Sunday's final after the 13-time Grand Slam winner beat Japan's Kei Nishikori in straight sets.
'Difficult decision - but you have to make it'
Nadal had his knee strapped up and his thigh massaged but the pain continued
Nadal had problems with his right knee during his third-round win over Russian Karen Khachanov.
The 17-time Grand Slam champion insisted it was not a major problem and won gruelling matches against Nikoloz Basilashvili and ninth seed Dominic Thiem to reach the last four.
But the knee injury which has caused him problems throughout his career came back to ruin his seventh US Open semi-final.
Nadal said he was not feeling any issues during practice on Thursday nor before Friday's match.
He started to feel pain at 2-2 in the first set, called for the trainer during the changeover at 4-3 and then again at 2-1 in the second.
Although the three-time US Open champion continued until the set was complete, the inevitable decision came after another chat with the medical man.
"I was trying to hope it would improve but it was not to be," said Nadal.
"I waited as much as I could, it was very difficult for me to say goodbye before the match finished but at some position you have to make a decision," he added.
Del Potro finally has another Grand Slam shot
Del Potro will seek to complete a remarkable comeback by winning his second Grand Slam title
Del Potro, 29, last competed in a Grand Slam final when he won at Flushing Meadows in 2009 by ending Roger Federer's 41-match winning streak.
He has since suffered a catalogue of injury problems, contemplating retirement after having three operations on his wrist, before fighting back to his highest ranking this year.
Del Potro stood back and led a standing ovation on Arthur Ashe Stadium when Nadal, who looked emotional as he limped heavily between points before retiring, walked slowly off court.
"It is not the best way to win a match. I love to play against Rafa because he is the biggest fighter in the sport," Del Potro said.
"I don't like to see him suffering like today. I am sad for him. I think the key of the match was the first set."
Del Potro started confidently against Nadal, who had beaten him in three of the previous four Grand Slams, as his powerful groundstrokes helped him break serve for 1-0 and 5-4 leads.
Nadal wiped them out on both occasions in the very next game - Del Potro missing two set points at 5-4.
However, Del Potro recovered to win the tie-break and then ran away with the second set as the extent of Nadal's injury problems became clear.
It was his first win in four Grand Slam semi-finals since beating Federer in 2009, having lost to Djokovic at Wimbledon 2013, then twice to Nadal at last year's US Open and Wimbledon in July.
"I was close to quitting this sport because I couldn't find a way to fix my wrist problems," said Del Potro. "I have been suffering a lot. I got depressed for couple of months also.
"I didn't expect to get this kind of emotions playing tennis again. Reaching finals, winning titles, having my highest ranking ever in this moment, everything is almost perfect."
-- Courtesy of BBC Sport