Federer fell in four sets to Ukrainian outsider Sergiy Stakhovsky in a closely fought match, marking his earliest exit from Wimbledon since 2002.
The Basel native struggled from the outset against the tall (six foot, four inch) Stakhovsky who played aggressively at the net and was able to match Federer's powerful serves with his own.
The upset result, 6-7,7-6, 7-5,7-6, will raise more questions about the Swiss star's future after a lacklustre year without any major victories.
The loss means the 17-time Grand Slam singles champion will likely drop to fifth from his current third place in the world rankings after Wimbledon ends.
The result also ends Federer's run of 36 consecutive Grand Slam quarter-final appearances, which began at Wimbledon in 2004.
Not everyone is ready to count him out.
"I will not say it was the best performance by Roger because it wasn't but I still think he has one Grand Slam left in him," former Wimbledon champion Goran Ivanisevic told BBC Radio 5.
Federer earned a standing ovation from the crowd at Centre Court.
"It's always a disappointment losing any match around the world, and particularly here," he commented, following the match.
"I've had some great moments here, but also some tougher ones."
Federer credited his opponent "for closing it out under enormous pressure".
Stakhovsky "was better in the more important points today than I was", he said..
"I'm going to accept it and move forward from here — I have no choice."
Stakhovsky was struggling to take in his victory over the 17-time Grand Slam champion.
"I'm still in disbelief that it actually happened," said the 27-year-old, who does not even have a coach.
"I played my best tennis and still it almost wasn't enough."
The win marked the first time that he had ever beaten a top 10 player in 21 attempts.
Federe's exit from the tournament, meanwhile, follows other upset defeats suffered by Rafael Nadal and, on the women's side, Maria Sharapova, in Wimbledon's first few days.