Federer's failure, on the heels of a shock second-round Wimbledon exit, thwarted a potential quarter-final match with 12-time Grand Slam winner Rafael Nadal, in what would have been their first meeting on the New York hardcourts.
"If I'm playing like this, I'm not going to beat Rafa," five-time US Open champion Federer said.
Instead, it will be Robredo, in his first US Open quarter-final, awaiting the winner of a later match between Nadal, who is 6-0 against his countryman, and Germany's 22nd-seeded Philipp Kohlschreiber.
Robredo, who had lost his 10 prior matches against Federer, suffered seven prior fourth-round US Open defeats and matched his best Grand Slam performance by finally breaking through.
"To beat Roger, it's something amazing," Robredo said. "It's like a dream. I am so happy. It was a great day."
Spanish fourth seed David Ferrer reached his eighth consecutive Grand Slam quarter-final, hitting 13 aces among his 46 winners to defeat Serbian 18th seed Janko Tipsarevic 7-6 (7/2), 3-6, 7-5, 7-6 (7/3) in a rematch of a 2012 US Open quarter-final.
Ferrer will face the winner of a later match between French eighth seed Richard Gasquet and Canadian 10th seed Milos Raonic.
In taking as many sets off Federer as he had in 10 prior losses combined, Robredo also raised questions about the future of the former world number one, who had not missed the US Open quarter-finals since a 2003 fourth-round exit.
"I'm going to feel like I beat myself," Federer said. "It was up to me to make the difference and I just couldn't.
"I self-destructed, which is really disappointing. When things came to the crunch I just couldn't do it. It's frustrating."
Federer, 32, won only two of 16 break-point chances.
"I'm delighted. Today the difference is I won the break points and he did not," said Robredo.
Federer hit 45 winners but also made 43 unforced errors and managed only five aces while Robredo hit 70% of his first serves and won four of his seven break chances.
Federer had made 36 consecutive Grand Slam quarter-final appearances before being upset by Ukrainian Sergiy Stakhovsky in the second round at Wimbledon, having not departed a major before the last eight since the 2004 French Open.
This was the first year since 2002 that Federer has not made a Grand Slam final.
It was the first time Federer has missed the last-eight in consecutive Slams since the 2003 Australian and French Opens, just before he won his first major crown at Wimbledon later that same year.
Federer, whose seventh seeding at the US Open was his lowest at a Grand Slam event since 2002, failed to match the career record of 41 Slam quarter-finals by retired US star Jimmy Connors.
A rain delay of more than four hours pushed his match from Arthur Ashe Stadium to Louis Armstrong Stadium, marking the first time since a 2006 triumph over Frenchman Marc Gicquel that Federer had played at the secondary court.
Federer's only defeat in eight prior Armstrong appearances came when he lost to Spain's Juan Carlos Ferrero in the third round in 2000 in his first US Open.
Federer had made eight career comebacks to win after dropping the first two sets but he failed on five break points in the fourth game of the third set, which Robredo held to reach 2-2, and there was a sense a comeback chance had been squandered.
"The ball from Roger, it comes like fire," Robredo said. "All the time it's so fast. You have to be trying so hard with your legs to go down and try to put the ball in."
Robredo broke Federer at love in the seventh game for a 4-3 edge and they held to set up the final game, fans chanting, "Let's Go Roger" in vain hopes of willing the wilting once-king to a rally for the ages, only to watch as Robredo held again to win in two hours and 24 minutes.
"I started badly," Federer said. "But I struggled throughout, which is not very satisfying. Tommy did a good job to keep the ball in play and make it difficult for me.
"I missed so many opportunities. Rhythm was off. When those things happen, clearly it's always going to be difficult."