There will be no "Rafa Slam" for the world's best tennis player.
Nadal, who had won three straight Grand Slam tournaments heading into the competition, was denied the so-called "Rafa Slam."
"This is a difficult day for me," Nadal said, adding that he preferred to not talk about the nature of the injury.
Nadal, who appeared to have tears in his eyes during a changeover while trailing 3-0 in the third set, took a medical timeout for an apparent leg injury after three games and was clearly out of sorts, failing to chase down balls that he would ordinarily return easily.
"Today I can't do more than what I did, he played at a very high level," he said.
When pressed about the injury, Nadal added: "I don't have to tell you what I felt on the court, but it is obvious I did not feel at my best. I had a problem with the match at the very beginning, and after that, the match was almost over."
It was the second year in a row he lost in the quarterfinals here due to injury — in 2010 he retired against Andy Murray due to a right knee ailment that kept him off the tour for two months, again on the Australia Day national holiday.
"This is one big victory for me, but it's not like a victory really," seventh-seeded Ferrer said on court after the match. "He was playing with injury ... and I had luck. But I played my game."
Nadal, who didn't bother chasing the winner on match point, won last year's French Open, Wimbledon and U.S. Open and was trying to add the Australian title so he could hold all four major trophies at once. That hasn't been achieved since Rod Laver won four in a row in 1969.
Nadal didn't want to elaborate on his injury, saying he didn't want to use injuries as an excuse.
"In general, I had a virus. When you have a virus, your body goes down and you have more risk of everything," he said of a sickness he picked up in Doha at the start of the year and carried into the tournamnent. "That's probably what happened. That's the simple thing."
As the fireworks exploded, Nadal changed his shirt and briefly left the stadium. He came back a couple of minutes later and took off his right shoe and fidgeted with his toes and sock.
After losing the second set, the usually fidgety Nadal slumped in his chair at the changeover, completely still with his head bent.
The crowd cheered almost exclusively for Nadal — "Come on, Rafa," — they roared, while often applauding Ferrer's errors.
All, eventually, for nothing.
Nadal picked up a virus two weeks ago. He sweated profusely in several of his matches, but appeared to be over his problems, saying after his fourth-round win over Marin Cilic that he was "perfect physically."
At the end of the day, a reflective Nadal pondered his loss in the quarterfinals again.
"Last year I had a fantastic year," he said. "I think it is almost impossible to repeat that. I still hope to have a lot of really good moments."
Based on reporting by the Associated Press.