Rafael Nadal hits a return to David Ferrer. (Photo: AFP/Don Emmert) |
Ferrer, a former world number three but now standing at a lowly 148, called it quits on a hot and humid night on Arthur Ashe Stadium when he led 4-3 with a break in the second set.
Top seed Nadal had taken the opener 6-3.
"This is my last Grand Slam," said Ferrer who was runner-up to Nadal in the 2013 French Open final.
"I have great memories of this tournament and I am just sorry that I couldn't finish it tonight."
Ferrer, 36, will play his last tournament on home ground in Madrid next year.
"I am very sorry for David and sad for him," said Nadal.
"We are close friends and have shared great moments - the Roland Garros final and Davis Cup wins.
"He is one of the greatest players to have come from our country. He's a great person and great player."
Nadal, chasing his 18th Grand Slam title, will face Canada's Vasek Pospisil for a place in the last 32.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional