The 36-year-old, one of the outstanding players of this era, is renowned as a warrior and had never pulled the plug midway through a contest in 207 previous grand slam matches.
He was a break up on Nadal at 4-3 in the second set having lost the opener 6-3 in steamy conditions on Arthur Ashe Stadium but was clearly struggling with a left calf injury and decided he could no longer continue.
Ferrer plans to retire at an event in Spain next season, and he told the crowd: “It was pain. I tried to play but I think it (his calf muscle) is broken. I have really good memories here. This is my last grand slam. I’m so sorry because I can’t finish the match. I will miss you a lot.”
After a fine start to the match, Nadal’s forehand went awry in the second set, but his primary feeling at the end of the clash was empathy for his compatriot.
The world number one said: “I’m very, very sorry for him. He’s one of my closest friends on tour. We shared amazing moments together playing French Open finals, a couple of Davis Cup finals. It’s sad to see him finish like this but he deserves everything because he’s a fantastic player.”
Ferrer reached his only slam final at Roland Garros in 2013 and climbed as high as world number three the same year.
Nadal moves through to a second-round clash with Canada’s Vasek Pospisil while Stan Wawrinka is also on an eight-match winning streak at Flushing Meadows after defeating Grigor Dimitrov for the second successive slam.
The Swiss won his third slam title here two years ago but was unable to defend it after undergoing knee surgery from which he has struggled to recover.
Having returned to the tour at the Australian Open, it is only in the last month or two that Wawrinka has started to look anything like his old self, a sequence that began with a shock victory over Dimitrov at Wimbledon.
Their respective form since them made this far less of an upset, although Dimitrov was the eighth seed while Wawrinka is still ranked just outside the top 100.
After his 6-3 6-2 7-5 victory, the 33-year-old said: “There is a lot of question marks of how my body will be right, how mentally I will be right. A few weeks ago I was still struggling a lot.
“I’m improving tournament after tournament, match after match. And I can see that the last tournaments, it went really high, from struggling in the match to competing at a really high level. So I’m really happy with that.”
Good luck and godspeed, David Ferrer. We are losing something that will never be replaced. pic.twitter.com/9YeTMEhIyE
— TroubleFault (@troublefault) August 28, 2018
One of the most eagerly-anticipated matches of the day was between Canadian teenagers Denis Shapovalov and Felix Auger-Aliassime.
Shapovalov, 19, burst on to the scene last summer but for 18-year-old Auger-Aliassime this was his first taste of the big time after coming through qualifying.
Sadly for the younger man, he was forced to retire in tears in the third set after experiencing heart palpitations in the hot and humid conditions.
The pair are best friends, and Shapovalov consoled his compatriot before saying: “It’s actually really tough to see him going out like this. I told him at the net we’re going to be back here, we’re going to play so many of these.”
Man of the moment Stefanos Tsitsipas won his first main-draw match at Flushing Meadows, beating veteran qualifier Tommy Robredo 6-3 7-6 (7/1) 6-4, while there was an emphatic 6-0 6-3 6-4 victory over Donald Young for third seed Juan Martin del Potro.
Last year’s runner-up Kevin Anderson was in deep trouble at two sets to one down to American Ryan Harrison and struggling with cramp but recovered to win 7-6 (7/4) 5-7 4-6 6-3 6-4.
After missing four successive grand slam tournaments with the hip problem that forced him to have surgery in January, just stepping back onto a match court at one of tennis’ biggest events was already a victory of sorts.
But Murray still fervently believes he can get back to the top of the sport and, although this performance will not have set any alarm bells ringing among his rivals, it was a positive start.
After dropping the first set on a tie-break, Murray gradually began to take control against Duckworth, who could empathise with his opponent having undergone five operations since the start of 2017.
Murray eventually ground out a 6-7 (5/7), 6-3, 7-5, 6-3 victory in hot and sticky conditions on the new Louis Armstrong Stadium and moves through to a second-round clash with 31st seed Fernando Verdasco.
The Scot said: “At times it was tricky especially early on, it was very lively, very hot. James was serving big and playing a lot of drop shots, throwing me off rhythm. I was happy I managed to get through that and play some good stuff at times.
Whatever else happens, nice to see Andy Murray on a Grand Slam tennis court again.— David Law (@DavidLawTennis) August 27, 2018
“I’ve lost a lot of matches out here over the years, I’ve struggled a lot, but it’s like a new beginning. It was beautiful, a great atmosphere and I’m very, very happy to be back.”
Murray never seemed comfortable in the tight confines of the old Louis Armstrong and had many tough battles on there, so the space and airiness of the new court – as well as some shade – was very welcome.
This was only his fifth tournament and eighth match since returning to the match court at Queen’s Club in June, so these are very much still baby steps.
Murray’s shots lack the penetration of old while his second serve often barely crept above 70 miles per hour, but his movement is improving all the time and ultimately he was too good for Duckworth.
For the first time since Wimbledon last year Andy Murray is a winner at a Grand Slam, beats James Duckworth in four sets. Not especially pretty but a Usain Bolt-style sprint in the last game. Job done.— Mike Dickson (@Mike_Dickson_DM) August 27, 2018
When he sprinted to pick up a drop volley and guide the ball down the line to set up match point, celebrating as he raced past the net, it was almost as if he had never been away.
Duckworth, a 26-year-old once ranked as high as 82 but now down at 448 following three surgeries on his foot and one each on a shoulder and elbow, did not allow Murray to get comfortable early on and more often than not was the aggressor, particularly off his backhand.
He dug in very well to take the first-set tie-break and, after Murray stepped up in the second set, the third was the crux of the contest.
Murray’s groundstrokes at last began to push Duckworth back and he played a fine point to break serve in the final game, the Australian’s racket paying the price.
It was Murray slamming his racket angrily to the ground after dropping serve in the opening game of the fourth set but he broke straight back and looked encouragingly fresh as he wrapped up victory after three hours and 18 minutes.
Nadal starts on Monday with an emotional 31st career clash with good friend and Davis Cup teammate David Ferrer. The former world No3 Ferrer has dropped out of the top 100 and is set to retire at the end of the year.
Speaking about the match, Nadal said: “We are good friends and he has been an amazing player for such a long time.”
Watch the full video below.