The two-time defending champion made it into another final at the tournament following a high-class display in a 6-4, 6-4 win.
The Scot, who has never lost in Shanghai, returned superbly to set up a title match with Novak Djokovic, the man he beat to win the US Open last month.
The world No 3 kept his focus amid some confusion at the start of the second set. He watched six break points go begging and was told the roof would be closed as light rain started to fall. As the roof was closing, Federer went on to hold his serve, but the rain quickly stopped, the roof reopened before it could shut fully and for the remainder of the match, the Swiss had no answer to Murray's power and accuracy.
The rain returned before Murray served for the match and the roof was closed completely this time. A substantial delay led to both players going off court, but it could not derail the Scot as he closed out the match on his return.
"He didn't serve that well and I was able to be aggressive," said Murray. "He maybe slowed down his first serve a little bit so I was able to take a few more chances on the first serve. Obviously that helped, but I went for it like I did the last few times I played against him. When you're beating the best player of all time it's always special."
The Scot will be looking for a third consecutive victory over Djokovic after beating the Serbian world No 2 in the Olympic semi-final and then in their Flushing Meadows showdown.
"I've known him for 14, 15 years now," Murray said. "We've obviously had some incredibly tough matches which can maybe test a friendship. But we've always been I think pretty respectful of each other."
Meanwhile, a disappointed Federer admitted his performance had been "a bit up and down" and that Murray had been the better player, describing his performances in Shanghai as "OK".
"I played all right. I didn't play great. But I did come here and reach the 300 weeks [at world No 1]. I guess I have to be happy with that," he said.
Earlier, Djokovic was in dominant form as he beat Tomas Berdych. The Serb broke early in each set and, despite a brief dip in form when 5-1 up in the first, he eased to a 6-3, 6-4 win.
"Obviously it's a big challenge when you play a top-10 player," Djokovic said. "Tomas has been in great form for the past couple of months. He's always a difficult player to play against on any surface as he has a very powerful serve and great forehand.
"I played tactically right. I was putting a lot of returns into the court, putting a lot of pressure on his serve. On the other hand, I was serving well when I needed to."
Looking ahead to his clash with Murray, Djokovic, who is attempting to reclaim the top ranking before the end of the year, added: "I don't like the word 'revenge.' I never like revenge. I just play tennis and I try to win every match that I play."
Berdych, for his part, admitted he was unable to cause Djokovic too many problems.
"He's a great player," he said. "I think just the game that he plays, it's not the one that suits my game that much. I like to play quite aggressive. But this doesn't hurt him that much so it's much more difficult for me to play him.
"He's the second player in the world and chasing first place. It's really tough to find the way and have a positive record with him."
In the men's doubles, British pair Colin Fleming and Ross Hutchins put up a valiant fight against Mahesh Bhupathi and Rohan Bopanna before going down 6-7, 6-3, 10-8 in the semi-finals.
Contextual targeting label: