The top-ranked Djokovic defeated David Ferrer 6-4, 6-2 to extend his winning streak in China to 28 matches, while Federer played a nearly flawless second set to beat Julien Benneteau of France 7-6 (4), 6-0.
It will be the 36th meeting in their rivalry, which has been remarkably close, with Federer taking 18 of their matches and Djokovic 17. The players have split their four matches this year, though Djokovic earned the far biggesr prize with his second Wimbledon trophy in July.
"There is no clear favourite," Djokovic said. "Every time we play against each other, it's a thriller."
The Serb would seem to have a slight advantage given his recent dominance in China, where he hasn't lost since a semifinal defeat to Federer in Shanghai in 2010. Since then, he's captured the China Open three times, and the Shanghai Masters twice.
But Djokovic doesn't believe the court — or his sizeable contingent of Serbian-flag-waving Chinese fans — will give him an edge.
"Well, it's not like he didn't have a lot of success anywhere he went, including China," he said. "He knows how to play here. He has also big support."
Djokovic played much better on Friday than he did in the previous round, when he struggled to put away big-hitting Mikhail Kukushkin.
He was tested just once against the fifth-seeded Ferrer, while serving for the first set at 5-4. The Spaniard played remarkable defence to fight off three set points, then held two break points for 5-all. He failed to convert either, though, and Djokovic finally ended the tiring, 13-minute game with a drop shot followed by a volley into the open court.
Federer, too, played his most solid match of the week against Benneteau. He had 34 winners to only 13 unforced errors, and won nearly all of the points on his first serve (34 of 37).
The Swiss star, who will overtake Rafael Nadal to return to No. 2 in the rankings next week, said he has faced Djokovic so many times now, there were no secrets to each other's games.
"We'll see how much he can actually do, how much he can neutralize me, and how much I can do with him," he said. "But he's playing a great season again. I'll give it the best shot I have. I have a good game at the moment."
The other semifinal will feature two veterans playing some of their best tennis — Gilles Simon and Feliciano Lopez.
Lopez, who knocked out an ailing Rafael Nadal in the second round, defeated Mikhail Youzhny 5-7, 6-4, 6-4 in the quarterfinals.
At 33, the Spaniard is having a resurgent year, winning his fourth career title at Eastbourne and rising to No. 16 in the rankings, one off his career high. He's also a three-time semifinalist in Shanghai, though he's never advanced to the final.
Simon upset sixth-seeded Tomas Berdych 7-6 (4), 4-6, 6-0. It was his second top-10 win of the week after beating fourth-seeded Stan Wawrinka in the second round.
Asked the last time he managed to do that, he said, "I don't know. You tell me. Maybe never."
Lopez has won two of their three previous meetings, though both matches were on grass.