A brilliant attacking display from the 17-times Grand Slam winner, who served with aggression and spent much of his time at the net, unsettled the world number one for a 6-4, 6-4 win.
Djokovic, the reigning champion in Shanghai who clinched his fifth China Open title last week, was gunning for his 29th consecutive win on Chinese soil in his first match with Federer since their epic Wimbledon final.
Both players were looking to unnerve each other early on, with Djokovic attempting riskier groundstrokes to counter Federer confronting him at the net.
Every point was greeted with exuberant cheers in Shanghai’s packed Qizhong Tennis Center, and the stadium erupted when Federer broke serve on his second break-point in the fifth game.
VALIANT DEFENCE FROM DJOKOVIC
Djokovic saved the first break-point by finding a way past Federer — who was again at the net — but gave away his serve with a weak backhand slice moments later.
He then earned his sole break-point of the set in the next game, which Federer saved. The 33-year-old Swiss then produced a perfect serving game at his next opportunity, firing four successive aces to march to a 5-3 lead as he closed in on the set with another ace.
Federer carried his ruthless approach into the early stages of the second set, breaking in the first game with a lifting groundstroke that was beyond Djokovic’s right.
Djokovic staged a valiant attempt to break as he was losing 3-5 with some incredible net-play as the pair tussled at deuce. But Federer recovered and claimed set and match in one hour 36 minutes.
Federer improved to 19-17 against Djokovic with the result, and will overtake Rafael Nadal to claim second place in the rankings next week on the back of his run in Shanghai.
Federer’s best showing at the Masters 1000 event was as runner up in 2010, although he did win in Shanghai when it hosted the Tennis Masters Cup in 2006 and 2007.
He will meet Gilles Simon in the decider Sunday, after the Frenchman powered past Feliciano Lopez 6-2, 7-6 (7/1) to reach his first Masters final in six years and seal his return to the world top 20.
The world number 29 has only contested one Masters final to date, when he lost to Andy Murray at Madrid 2008, but he is in a rich vein of form after also reaching the last four in Tokyo last week.
Simon beat Australian Open champion Stan Wawrinka and then sixth seed Czech Tomas Berdych in the Shanghai quarter-finals after taking every game in the final set.
On Saturday, he picked up where he left off in the quarters, serving up a masterclass in aggressive play early on against Lopez of Spain.
The former world number six broke Lopez’s serve in the third game, before marching to a 5-1 lead and taking the set.
Lopez only mustered points in two of his opponent’s six service games in the second set, as the Frenchman sealed the match in 80 minutes.
“I really played what I had to, Simon said.
“I was feeling really good from the baseline. I felt I almost didn’t lose one point from the baseline the whole match.
“It was difficult for him in the first part, then he was extra aggressive, I would say, hitting full power his first serve, second serve, coming to the net every time on his serve.
“But still I was really playing good on my service game. I think I lost, what, seven points in the match. It never happened to me on my serve.”
Simon will re-enter the top 20 following his semi-final win, and could rise as high as 15 if he clinches the title on Sunday. -AFP