Two months after he was beaten by Sergiy Stakhovsky in the second round at Wimbledon, the 17-time grand slam champion slumped to a 7-6 (7/3) 6-3 6-4 defeat against a man he had not lost to in 10 previous meetings.
The defeat continues a miserable season for the 32-year-old, who has dropped from world number one to number seven in less than 12 months and has failed to reach a grand slam final for the first time since 2002.
It also means there will be no first meeting at Flushing Meadows between Federer and Rafael Nadal, who defeated Philipp Kohlschreiber in four sets.
Federer said: "I kind of feel like I beat myself, without taking any credit away from Tommy. Clearly he was making sure he was making many balls. It was up to me to make the difference and I couldn't.
"I kind of self-destructed, which is very disappointing, especially on a quicker court. Your serve helps you out. You're going to make the difference somewhere.
"I just couldn't do it. It was a frustrating performance."
With the humidity level at 91%, perhaps it was not surprising that Federer never looked comfortable.
He was not moving well, tactically he was suspect and 43 errors in three sets betrayed an understandable lack of confidence.
The statistic that really hurt the Swiss was only two break points won from 16 chances, and Robredo made sure he played the solid match his opponent tried desperately to find but could not.
Federer remains convinced he can find his best form again, saying: "It just ended up being a bad combination of many things.
"So I've definitely got to go back to work and come back stronger, get rid of this loss now as quick as I can because that's not how I want to play from here on.
"I want to play better. I know I can. I showed it the last few weeks, that there is that level."
The match was moved from Arthur Ashe to Louis Armstrong not long before the start because of a lengthy rain delay.
It was the first time Federer had played a match on Flushing Meadows' second court for seven years, but he insisted that was not a mitigating factor.
"That should not be the issue," he said. "That's definitely the last excuse you could find.
"I've been practising on Armstrong. I was prepared for it. I was even happy about it. I thought it was going to be a great atmosphere."
At the same time on Saturday night Robredo had been fighting to avoid being taken to a deciding set by British qualifier Dan Evans on the same court.
It has been a superb year for the Spaniard, who was ranked 471st when he came back from thigh surgery last spring.
He said: "It's amazing. For me, Roger for the moment is the best player of all time. And to beat him in a huge stadium like the US Open and in a match of best of five sets, it's like a dream.
"I am so, so happy. I am in the quarter-finals again. It was a great day."
Nadal also struggled to take his chances and it cost him in the first set against 22nd seed Kohlschreiber, who saved three set points before winning the tie-break.
But once Nadal forged ahead in the second set he was always in the ascendancy and he ran out a 6-7 (4/7) 6-4 6-3 6-1 winner after a gruelling three hours and 12 minutes.
The second seed said: "It's not easy to play during these days. It's very uncomfortable, very tiring.
"That's why I felt when I lost the first set, the first set was very important. Then you are in trouble, because physically you can have lower moments on days like today [Monday]."
In 2010 and 2011 Federer and Nadal looked set to meet in the final only for Novak Djokovic twice to save match points against Federer.
Nadal doubts whether the two dominant players of the era will now meet at Flushing Meadows, and he said: "It would have been great if we were able to play in the final, because for so many years we were able to play in all the best stadiums around the world.
"We played the other three finals so probably we deserved to have that match here in the US Open, too, the biggest court of the world. But it didn't happen.
"That doesn't mean it cannot happen in the future. Hopefully. But it's true that we are getting older, so the chances are less today than five years ago."
The other quarter-final in the bottom half will pit fourth seed David Ferrer against eighth seed Richard Gasquet.
Ferrer toughed out a 7-6 (7/2) 3-6 7-5 7-6 (7/3) win over Janko Tipsarevic while Gasquet won a titanic struggle against 10th seed Milos Raonic 6-7 (4/7) 7-6 (7/4) 2-6 7-6 (11/9) 7-5 after four hours and 40 minutes.
The Frenchman, once known for his lack of bottle, saved a match point in the fourth-set tie-break and ended an 11-match losing streak in the fourth round of grand slams dating back to 2008.