In the tournament's biggest upset, the Swiss world number two had no answer to unseeded Italian Andreas Seppi, who he had conquered in their past 10 meetings.
"Just a bad day. I wish I could have played better but clearly it was tough losing the first two sets," Federer said after crashing out in the third round.
"I had chances to get back into it but let it slip. It's a disappointing loss."
Federer was chasing his fifth Australian Open crown, but has now not won a Grand Slam title since Wimbledon in 2012.
More From This Section
He started sluggishly and from when he was broken to love in the first set, giving Seppi a 5-4 lead, it was clear something was amiss with Federer's game.
"I just tried to do my best and it was one of my best matches for sure to win against Roger," said the 46th ranked Seppi, who had only taken one set off Federer in their previous 10 matches.
The Scot has yet to be seriously tested at Melbourne Park, with a first-match tiebreak the closest he has come to dropping a set.
He will next meet Bulgarian 10th seed Grigor Dimitrov, who struggled against the 2006 Open runner-up Marcos Baghdatis with the fired-up Cypriot pushing him to five gruelling sets.
Murray has now reached the round of 16 for the seventh consecutive year as he bids to track down an elusive Australian title after losing to Federer in the 2010 final and Novak Djokovic in 2011 and 2013.
"Grigor has improved a lot over the last couple of years and it should be a fun match."
Dimitrov, Maria Sharapova's boyfriend, looked headed for defeat when Baghdatis won the third set before rallying to claim an exhausting 4-6, 6-3, 3-6, 6-3, 6-3 victory.
"I'm not going to hide my excitement of winning the match because it meant a lot to me," the 23-year-old Bulgarian said.
Rafael Nadal plays in a night match Friday, as does Sharapova.