Djokovic won 6-3, 6-4 in Beijing, but still relinquished his 11-month stay at the top such has been Nadal’s fine form in 2013.
The 27-year-old has won 65 of his 69 matches this year and 10 titles, including the French Open and US Open, where he beat Djokovic in the final.
By contrast, Djokovic has won three titles this year and believes it was vital to end a run of three consecutive defeats to Nadal.
“I needed this,” said the Serb. “I wanted to win against Nadal, who has been the best player so far in 2013. It’s important for my confidence.
“I managed to stay tough and not drop my concentration, which I think [happened] in both Montreal and at the US Open [against Nadal] in the important moments. I’ve learnt my lesson from a few very tough and close matches that I lost against Rafa on hard courts, especially the last one in the US Open final.
“It’s been an incredible week again at the China Open and I still haven’t lost a match here.
“I just love the conditions, the court and the atmosphere that goes around the tournament.”
Nadal is back to No1 for the first time since July 2011, despite tumbling down to fifth in the world rankings earlier this year as he fought back from a seven-month absence from the court due to a knee injury.
Defeat to Djokovic ended a 21-match winning streak and Nadal admitted he was second best.
“I couldn’t see a way to stop him and he was too strong for me,” said Nadal.
“It was difficult to create spin on this ball and he was able to hit all the balls where he wanted.
“When that’s happening against a player like Novak, you are dead, you don’t have a chance.”