Djokovic will play South Africa's seventh seed Kevin Anderson.
Also, French qualifier Benoit Paire upset 15th-seeded Pablo Carreno Busta 6-3, 6-4.
But the unseeded Spaniard earned a piece of personal history after that, winning the second set - the first time he had ever done that against the Swiss maestro. "Since Hamburg I got a lot of confidence and that helped me in Beijing".
Bautista Agut booked his place in the third round by beating Mackenzie McDonald in three sets on Wednesday.
Australian Matthew Ebden upset sixth-seeded Dominic Thiem 6-4, 6-7 (8), 7-6 (4) in a almost three-hour match.
A Masters event is a level below a Grand Slam, but Djokovic was rapt to crush Cecchinato. I like his demeanour, he is a great fighter and I like playing against those type of players.' Federer also analyzed his win over Daniil Medvedev: 'It was extremely hard, that is why I was very happy at the end. "I was aggressive when I needed to be". I was really pleased with the way I was holding my serve and the second set was ideal.
Since Djokovic lost that French Open match to Cecchinato, he's won 28 of his 30 matches. He's bidding to win a record fourth Shanghai title this week.
World number seven Dominic Thiem's bid to qualify for the next month's ATP World Tour Finals suffered a blow as he was edged out 6-4 6-7 (8) 7-6 (4) by Australian Matthew Ebden.
Fifth-seeded Marin Cilic became the highest seed toppled in Shanghai when 48th-ranked Nicolas Jarry of Chile rebounded for a 2-6, 7-6 (6), 7-5 second-round win.
Zverev, who said that he had a sore throat and blocked nose, will play Australia's world-ranked 33 Alex de Minaur next.