Federer was made to work hard for his 6-3 2-6 6-4 win against Roberto Bautista Agut to make it eight wins in a row against the Spaniard.
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.
Roger Federer had to overcome a second-set stutter. I always say when you win a Slam in any season, it's actually a very good season already.
Nevertheless, the top seed insisted he was content with how he's playing. "Bautista really had to raise his level of play in that second set to stay with me".
He will next face Kevin Anderson, who overpowered Mikhail Kukushkin with a 6-3, 6-2 win.
Zverev has been suffering with a cold but ratcheted up the pressure to grab the all-important break of serve in the ninth game before closing out the match against de Minaur, who this week replaced Nick Kyrgios as Australia's top-ranked player.
In the decider, Federer stared down a break point in just the second game, but from then on, showed some great net play to hold and then earn himself a break point, the very next game.
Jarry no pudo ante Edmund y se despidió del Masters de Shanghai
Su segundo servicio comenzó a fallar a partir del tie break del primer set, y terminó condenándolo en la segunda manga. Marin Cilic perdió ante Nicolás Jarry .
China's leading ladies will be bidding to join Muguruza in the quarter-finals when they play on Thursday.
The pair added that Li's shining example and the explosion of tournaments in China after her Grand Slam wins had triggered the emergence of a new generation of players.
Thiem, who also received a first-round bye, struggled to find his rhythm in a tightly contested encounter which lasted two hours and 45 minutes. "So all this stuff, it's quite hectic to be quite honest, even though it seems like we have a lot of time", he said on Tuesday.
The 21-year-old German, regarded as one of the finest prospects in tennis, said that he expects other high-ranking players to follow suit.
"If you want to make the victor you have to take a lot of risks, it seems like".
The tennis season reaches its climax with the ATP World Tour finals in November.