geneva; font-size: small;”>Murray, 25, was aiming to become the first British man since Fred Perry in 1936 to lift a major singles trophy.
But 30-year-old Federer won 4-6 7-5 6-3 6-4 on Centre Court to match the mark set by Pete Sampras and reclaim the world number one ranking.
A tearful Murray has now lost all four of his Grand Slam finals.
He was the first Briton to contest the Wimbledon men’s singles final since Bunny Austin in 1938, but fell just short of the ultimate goal.
“Everybody always talks about the pressure of playing at Wimbledon, but it’s not the people watching – they make it incredible,” said a tearful Murray in the wake of his defeat.
“There are mixed emotions. Most of them are negative. The reaction from the crowd was great. I felt like I was playing for the nation and I couldn’t quite do it.”
“I have been in the same position as Murray at the Australian Open. I couldn’t make a speech and it’s really tough. Andy played great tennis. The match was played at an unbelievably high standard. Murray will win this title. I said it might not be this year but I wouldn’t put money against him next year. He is improving all the time.”
Federer fully deserved his victory, which not only sees him level Sampras on seven Wimbledon titles, but also secures him a record 286th week as world number one.
He is the second-oldest man to occupy top spot, goes away with a cheque for £1.15m and will head to the Olympics – also being staged at the All England Club – as clear favourite.
Murray, who collects the £575,000 runner-up prize, now shares his coach Ivan Lendl’s unenviable record of losing his first four Grand Slam finals.
Having made poor starts in each of the previous three – all of which ended in straight-sets defeats – Murray knew it was vital to secure the early momentum.
All was going to plan as a couple of pummelling backhands down the line, a tactic many highlighted pre-match, helped Murray break in the opening game and then consolidate the advantage for a 2-0 lead.
Federer looked uneasy with the pace his opponent was setting and began deploying sliced groundstrokes to slow things down.
A backhand landed on the baseline to engineer a break-back point in game four, and he converted it when Murray found the net.
Both men needed to serve their way out of trouble as the pressure mounted and, crucially, Murray produced a sensational volley at his feet to save the second of two break points in a 13-minute game eight.
He then struck with the help of a forehand pass that Federer ducked to avoid being hit – reminiscent of the aggression shown by Lendl during his career – and comfortably served out the first set.
Statistically, Murray actually improved in almost every area during the second, but the key difference was that he could not take his chances.
Whereas the 25-year-old converted both break points that came his way in the first set, he let two slip at 2-2 and another two at 4-4.
Federer held for 6-5 before going on the attack, and he came from 40-15 down to level the match with a sensational backhand drop volley.
Heavy rain arrived at at 16:14 BST with Federer 40-0 up in game three of set three, and the prospect of further downpours saw the roof closed.
Image of Tom Fordyce Tom Fordyce Chief sports writer, BBC Sport
Murray, having had a shot at sporting immortality, will be haunted by this one for a while. But while it will be of little comfort to him now, another rather different battle might finally have been won.
MARATHON GAME FIVE
When play resumed 35 minutes later the Swiss, who destroyed world number one Novak Djokovic indoors on Friday, was vastly superior and put Murray under the cosh in a marathon game five.
Murray was reeled in from 40-0, Federer moving to deuce when the Scot took a heavy tumble at the net, and he slipped again before finally succumbing on a sixth break point.
Federer served out with a crunching ace and averted danger early in the fourth set before striking for 4-2 with a cross-court backhand pass.
He wrapped up his first Grand Slam title since the 2010 Australian Open when Murray hooked a forehand into the tramlines.
“This fortnight was a step in the right direction. I won’t go back on the court until my mind is right and I am over the loss,” added Murray of his future plans.
“The Olympics is a special event and I want to make sure I am ready. If I play like I did this week I have a good chance of winning a medal.”