Federer, who has won the season-ending championship an incredible six times before, will now face world number one Novak Djokovic in the title match on Monday night.
Djokovic was forced to come back from a set down to beat Argentina’s Juan Martin Del Potro 4-6 6-3 6-2 in the earlier semi-final.
With Murray coming over the back of the Olympic gold medal, for which he beat Federer in the final, and the US Open title, hopes were high that the Scot could win the season-ending title for the first time.
And they only got stronger when the world number three got off to a blistering start, breaking in the very first game and racing out to a 3-1 lead in double quick time.
But Federer, who was beaten by Del Potro in the last of the group matches on Saturday lunchtime, slowly forced his way into the match and by the time he broke back in the eighth game, he looked by far the more energetic player.
"Once he gets ahead, he's incredibly hard to stop. He tends to play better and better when he gets up," Murray said. "I feel like I gave him that advantage at the beginning of the second set.
"I started the match off very well. I was going for my shots a lot, and I was playing very aggressive on the return.
"Then he started to serve a little bit better, and I missed a few more returns. When got the break back, he started to play better. I hung on a little bit at the end of the first set, but couldn't quite sneak out the tie-break."
Murray, who had enjoyed an extra day off before the semi-finals - playing his final group match on Friday - temporarily slipped back into the kind of negative play he struggled with before coach Ivan Lendl came on board. He even appeared rattled by the crowd who were clearly more in favour of his opponent than him.
Even so, it was the pure quality from Federer that eventually won the match, rather than Murray throwing it away with what was occasionally sloppy play.
Federer is the two-times defending champion but will have to overcome an as-yet unbeaten Djokovic if he is to complete his London hat-trick.
Murray exploded out of the blocks, barely letting Federer get a ball in play as he opened with a break before going on to hold with ease for the first six games.
But a poor game from the Brit gifted Federer the chance to break back, the Wimbledon champion leaping at the opportunity, pulling Murray wide and drawing a forehand into the net to get back on level terms.
Murray held serve another couple of times to force the tie-break and even snuck out to a mini-break lead in the breaker before Federer again came racing back.
The Swiss player ended a 22-shot rally with an off-forehand winner across court to level up at the change of ends before Murray threw his whole bodyweight behind a forehand down the line, only to hit into the net and hand Federer two set points.
Murray saved the first with a forehand winner but could do nothing about the second, sealing the set on his own serve with a vicious backhand.
“For me, (the first set) was obviously huge," Federer said.
"It was always going to be hard to look back at the set and think you should have won it. Then you end up being down a set."
"Basically I really tried to pull myself together in the breaker, where I thought I didn't play great in yesterday's tie-breaker first set against Del Potro, and not being able to come back. It was obviously an important moment in the match."
The second set was a much more one-sided affair despite Murray holding for the opening game to supposedly get his match back-on-track after he cracked a racquet in frustration during the breaker.
But Federer was riding high on confidence by this stage and broke in the third game of the set, a poor drop shot attempt from Murray hardly helping matters before he went on to hit into the net and concede the game.
Federer went on to grab the double break in the sixth game, a sensational backhand passing shot winner doing the damage as he looked to serve out the match at the first attempt.
And that is exactly what the world number two did; a forehand down the line booked his place in the final after a Murray forehand had caught the top of the tape and sat up perfectly for Federer.
- Sports & Recreation