Four months after he had surgery on his back, the Scot produced a typically battling performance but eventually went down 6-3, 6-4, 6-7 (6-8), 6-3 to Federer, having saved two match points in the third set to extend the match.
It was a brave effort from the Wimbledon champion who always said he did not expect to win the tournament, having played just two competitive matches in four months. Although he pushed Federer hard, he eventually ran out of steam in the fourth set to suffer a defeat that will result in him dropping to No.6, at least, in the world rankings.
"It was tough because I haven't played at this level since surgery," said Murray. "My body held up pretty well, better than expected, but you never know how you are going to respond after surgery. I didn't expect to come here and win the event. That would have been completely stupid.
"Even if I had have won [against Federer], I would still have had to play Rafa [Nadal] in two days. It is a big ask. But hopefully I will be back to my best in a couple of months."
Murray acknowledged that a moment towards the end of the third set, at 4-4, could have cost him valuable energy. Chasing down a volley, Federer appeared to just reach the ball and somehow scooped a lob over the Scot's head to win the point. The Swiss went on to break for 5-4.
Replays eventually showed that the ball had bounced twice but Federer then asked the umpire to stop the big screen from showing replays. "He asked for them to stop showing it because I think he knew it bounced twice as well," Murray said. "At that speed it's very difficult to see but it was right in front of the umpire. In those situations we have replay, we have Hawk-Eye . . .
"Roger asked them not to show it because it looks controversial. But it's fine for them to show videos of me every time I get annoyed on the court; it's up there the whole bloody match."
Although Murray stormed back to break for 5-5, the incident cost him time and effort as he then fought back from 6-4 down in the tiebreak, saving two match points, to take it 8-6.
"Every point at that stage is crucial because I was pushing hard to try and get back into the match and fighting extremely hard," he said. "Rather than spending an extra 30 minutes on that set, I potentially could have been serving a little bit fresher at the beginning of the fourth set."
But Murray said he was proud of the way he fought and was pleased to make the last eight on his return after surgery. "I've come a long way in four months," he said. "I thought I did a good job getting myself in good shape to be competitive at this level."
Murray is due to fly to San Diego for the Davis Cup tie against the United States, which starts a week tomorrow. "I may go back through London for a couple of days [first]," he added.