The result was Nadal's first hardcourt loss of the season.
The second seed in Beijing only showed rare glimpses of the form that has seen him win 10 titles this year, with his Serbian opponent racing to a 3-0 lead in the first ten minutes.
Top seed Djokovic then powered ahead, showing formidable power-hitting to take the first set 25 minutes later.
The pair displayed incredible movement in the opening game of the second set, engaging in quickfire net-play, much to the delight of the crowd.
Nadal came out on top of that duel, winning the point, but Djokovic took the game to break serve.
Djokovic then kept his nerve, holding serve until the conclusion of the match on one hour 27 minutes.
The victory represents a sweet one for Djokovic, who is spending his 101st week at number one, and will have his current streak of 48 weeks ended on Monday when the ATP announce its new rankings with Nadal at the top.
The Spaniard only needed to make the final to unseat him.
After the match, Djokovic congratulated Nadal on his achievement.
"I have to say congratulations to Rafael because he deserves definitely to be number one of the world this year with the season that he has had," he said in an interview on court.
"He is the best player so far in 2013, there is no question about it.
"I am just very happy to be able to continue to play well and hopefully I can maintain the rhythm."
Djokovic has been in dominant form at the China Open, where he has an unbeaten run stretching back to 2009. He did not attend in 2011.
Nadal has had the beating of Djokovic this season, coming out on top at the semi-finals at Roland Garros and last month's final at the US Open, as well as the Canada Masters.
But he said that Djokovic was "too strong" for him in Beijing at the serve. Nadal did not break his opponent throughout the match.
"I didn't play my best match this afternoon. But he played at a greater level with his serve. I was not able to have any chance when I was returning during the whole match.
"He was able to hit all the balls where he wanted to hit them, so when that is happening against a player like Novak you are dead."
Nadal's return to the top for the first time since July 2011 marks an astonishing comeback for the 13-time Grand Slam champion, who spent the second half of last year on the sidelines injured.
Heading into the match at Beijing's National Tennis Centre, the pair had played each other 37 times, with Nadal leading the rivalry 22-15.
The winner of the China Open takes $557,100 prize money and 500 ATP Points.