September's US Open final to Andy Murray, beat German qualifier Michael Berrer 6-1, 6-7 (3/7), 6-2 in the men's first round, but the performance was far from impressive.
Djokovic, 25, took the first set with ease but lost the second on a tie-break after hitting several unforced errors against the 123rd-ranked left-hander, before improving his groundstrokes for the decider.
"I had a tough time to really return his serve in the second (set), because he went for precision more than the speed of his first serves," Djokovic said.
"He had a very high percentage of first serves in and he put a lot of pressure on my serves. I tried to stay closer to the line in the third, and it worked."
The number one seed has won China's Open on the two occasions he has entered, in 2009 and 2010, but missed last year because of injury.
Elsewhere, Spain's Ferrer retired due to illness during the first set of his match against Taiwan's Lu Yen-Hsun, and third seed Jo-Wilfried Tsonga of France battled to a three-set victory over Uzbekistan's Denis Istomin.
The world number seven lost the first set but came back to win 4-6, 6-1, 7-6 (7/3).
Tsonga's countryman Julien Benneteau, who lost in the final of the Malaysian Open just two days ago, was also forced to retire two games into the second set, handing Italy's Andreas Seppi an easy route to the second round.
In the women's event, Chinese star Li Na brushed aside on-form Nadia Petrova of Russia in straight sets to progress to the last 16.
Asia's top women's player, who needs a strong showing this week to qualify for the WTA Championships in Istanbul later this month, won the match convincingly at a packed National Tennis Stadium 6-1, 6-2.
It was the 2011 French Open champion's first win against Petrova, who triumphed at the Pan Pacific Open in Tokyo on Saturday, in seven attempts.
"That's the charm in playing tennis. Every day you can challenge yourself," Li said. "You are defeated consecutively, but it doesn't mean you are defeated by her all the time. This is sport. You never know what's going to happen."
Li, 30, who has never won her home tournament, played at a frenetic pace throughout, breaking her opponent's serve twice in the first set and three times in the second.
She was broken just once - in the sixth game of the second set, which lasted more than 13 minutes - and consistently served better than Petrova, hitting five aces to her opponent's one.
Li, ranked eighth in the world and seeded seventh in Beijing, will play compatriot Peng Shuai in the third round of the tournament - the fourth and final compulsory event of the women's calendar.
Asia's only Grand Slam winner is in eighth position in the race to compete at the $4.9-million end-of-season WTA Championships, which features the year's top eight players.
She is two places ahead of France's Marion Bartoli, the China Open ninth seed, who also progressed Tuesday, defeating Japan's Ayumi Morita 6-4, 6-3 while Spaniard Lourdes Dominguez Lino knocked out Laura Robson of Britain 7-5, 6-3.
Eighth seed Samantha Stosur of Australia suffered a shock second-round exit to Julia Goerges with the German winning 7-6 (7/2), 4-6, 7-5.
Former world number one Caroline Wozniacki fought back from a set down to defeat Taiwan's Hsieh Su-Wei 6-7 (5/7), 7-6 (7/3), 6-0.
Fifth seed Angelique Kerber of Germany beat Lara Arruabarrena-Vecino of Spain 6-2, 6-0, while defending champion Agnieszka Radwanska also went through, defeating China's Zhang Shuai 6-2, 6-3.
Azarenka, the top seed from Belarus who pulled out of last week's Pan Pacific Open quarter-finals with fatigue, ousted Germany's Sabine Lisicki 6-4, 6-2.