The Spaniard will play either Zverev or Nick Kyrgios of Australia in Sunday's final.
Nadal, the 2005 China Open champion, has a tour-leading 60 match wins in 2017. He held serve at love in his first three service games against Dimitrov and saved two break points in the seventh game.
Dimitrov hit a backhand crosscourt winner to take the second set on Nadal's serve in the 10th game. Nadal took immediate control of the third set, racing to a 4-0 lead.
Halep could have reached the No. 1 ranking earlier this year but was upset in the French Open final by Ostapenko in their first career meeting.
"Of course it's the best moment in my life, and I want just to keep it," Halep said in Beijing. "And I have few more dreams in my career. I tell you one, only one. To win a Grand Slam."
Halep only had to reach the final this week -- and not lose to Elina Svitolina of Ukraine in the final -- to knock Garbine Muguruza from the top spot. Muguruza retired during her opening match on Monday because of a cold.
Svitolina was ousted by unseeded Caroline Garcia of France in a marathon quarterfinal encounter.
Halep will play the winner of the semifinal between Garcia and Petra Kvitova of the Czech Republic. The Romanian will be looking for her second title of the year after winning in Madrid.
Ostapenko entered the semifinal without losing a set during the week. But Halep dominated the first set, breaking Ostapenko's serve in the first game at love. She cemented her lead with another break in the seventh game for a 5-2 lead to serve out the set.
In the second set, Halep surrendered a 3-2 lead with a service break in the sixth game but went on to break serve again in the ninth game. At 40-0 in the final game, Halep won with a clean forehand winner down the line.