Nadal, 27, was leading fourth seed Tomas Berdych 4-2 in the first set of their semi-final when his Czech opponent retired with a back injury.
Nadal will play current world number one Novak Djokovic in Sunday’s final. The Serb breezed past France’s Richard Gasquet 6-4 6-2 in his semi-final.
Nadal broke serve in the fifth game and Berdych, who said he injured his back while reaching for a shot, retired a game later after receiving treatment.
“It is special to be back to the top position of the rankings after more than half a year without playing tennis,” added Nadal. “What makes me happy is everything I did to be back where I am.”
Berdych praised Nadal’s achievement in regaining the top spot from Djokovic, who had taken over from the Spaniard more than two years ago.
Nadal returned to action in February after seven months on the sidelines with knee problems and has won 10 of the 12 finals he has contested since making his comeback, taking his Grand Slam victories up to 13.
“With Rafa, well, just all the credit,” said Berdych. “It is really incredibly well done in the short time that he has become a number one again. That’s really an achievement for an athlete like him.”
Djokovic has spent 101 weeks as world number one.
He was knocked off top spot in July 2012 by Roger Federer, after the Swiss player beat Andy Murray in the Wimbledon final, but returned to number one in November.
Nadal had been assured of reclaiming the top spot if he reached the final in Beijing or Djokovic failed to defend his title.