Top seed and holder Federer starts his campaign on Wednesday against Russia's Daniil Medvedev
Novak Djokovic had won all 11 previous matches against Jeremy Chardy and the world number three's perfect run was never in real doubt at the Shanghai Masters on Tuesday.
The Serbian, who has burst back to form this year, winning Wimbledon and the US Open, broke the Frenchman in the fifth game on the way to a 6-3, 7-5 victory to ease into round three.
The 31-year-old Djokovic had to contend with a more stubborn Chardy in the second set, before the second seed's superior shot-making won through in 83 minutes.
The 14-time Grand Slam champion missed six months of competition in 2017 and had elbow surgery at the start of this year.
But he has surged back to form and fitness and now has his eye on Rafael Nadal's number one ranking.
The Spanish great is not in Shanghai - where he lost to Roger Federer in last year's final - because of injury.
Top seed and holder Federer starts his campaign on Wednesday against Russia's Daniil Medvedev.
Nikoloz Basilashvili showed that his China Open triumph at the weekend was no fluke as he brushed aside the promising Denis Shapovalov.
The Georgian, up to a career-high 23 in the world following his victory over Juan Martin del Potro in Beijing on Sunday, beat the teenage Canadian 6-2, 6-2 in just 57 minutes.
The 26-year-old Basilashvili will now have another upset in his sights when he plays fourth seed Alexander Zverev at the Masters 1000 event on Wednesday.
Basilashvili's victory over an under-the-weather del Potro at the weekend was just his second ATP title, the first coming in Hamburg in July.
Del Potro, the Shanghai third seed who was suffering with a cold and flu in Beijing, meets France's Richard Gasquet.
A press conference for the Argentine on Tuesday was cancelled at the last moment, however, which suggests that he could still be unwell.