|Andy Murray moves on to face Novak Djokovic in a rematch of this year's U.S. Open final. (Getty Images)|
Djokovic moved into his 10th final of the year by beating fourth-seeded Tomas Berdych 6-3, 6-4 in the earlier semifinal.
Murray broke Federer in the fifth game of the first set but then wasted seven break points in the first game of the second, as the top-ranked Swiss managed to hold serve before a brief rain delay interrupted the match.
But Federer couldn't stave off Murray as he again broke to go up 3-2, but the U.S. Open champion had to endure one more rain delay before serving out the match.
The players went off the court for about 30 minutes at 5-4, while organizers closed the eight-petal magnolia-shaped roof. When play resumed, Murray only needed five points to finish off the match.
"You'll pay the price by having an average game like that against a top guy like Andy," said Federer.
Murray improved his record over Federer to 10-8 and won their last outing in the Olympic final in London. Federer won their meeting in the Wimbledon final earlier this summer.
Federer struggled with an erratic first serve, double faulting five times in the match. Most notably, Federer lost his serve in the fifth game of the first set when from 0-15 he double-faulted three straight times to surrender his serve.
"It has happened," said Federer, when asked if he has ever served three consecutive double faults in a match. "And today again. It happens, unfortunately."
Murray eagerly took advantage of Federer's serving problems.
"He didn't serve that well for him tonight, so I was able to be very aggressive on his second serve," Murray said. "He, maybe, slowed down his first serve a little bit so I was able to take a few more chances on his first serve."
Federer posted 33 unforced errors in the two sets and was broken on three of 11 opportunities he offered to the Scot.
Djokovic is looking for his fifth title of the year and second straight after winning in Beijing last week.
Against Berdych, he hit 25 winners and converted all three of his break points to improve his head-to-head record against the Czech player to 10-1.
It was Djokovic's tour-leading 69th victory of the year.
"Movement today was very important from my side, to be on a very high level so I can try to get into the longer rallies where I find more chances on my side to win the rallies," Djokovic said. "[I] played tactically right. I was putting a lot of returns into the court, making a lot of pressure on his serve."
Djokovic rushed out to a 5-1 lead in the first set, but when serving for the set at 5-2 was broken for the only time in the 1 hour, 25 minute-long match.
In the second set, Djokovic broke Berdych's serve in the third game and carried that advantage to win the match.
"First of all I need to give credit to Novak, he started really like a champion," Berdych said. "He started really, really great, and didn't give me a chance at all."