Nadal, who is still in the market for his first Shanghai Rolex Masters title, had little trouble dispatching American Jared Donaldson 6-2, 6-1 in just 54 minutes as he extended his winning streak to 13 matches on a rain-hit day at the Qi Zhong Stadium.
The world number one surrendered only four points on serve in eight service games in the match. Failing to extend even a break point opportunity to Donaldson complicated the possibility of the American advancing to the round-of-16.
The 16-time Grand Slam champion will next take a 9-3 head-to-head series lead into the third round against Italian Fabio Fognini, winning their two 2017 meetings in Miami and Madrid.
On the other hand, Federer had to work harder for his 7-6 (4), 6-4 second round win over Diego Schwartzman of Argentina. The Swiss maestro led 4-2 in the first set but surrendered that lead to end up fighting it out in a tiebreaker.
The 2014 Shanghai champion struggled to close out the match when serving at 5-4, requiring two match points to get the deed done. In the end, a 14th ace moved Federer onto a round-of-16 match against qualifier Alexandr Dolgopolov.
Also, sixth seed Grigor Dimitrov moved in to the round of 16 after beating American Ryan Harrison.
Dimitrov, who had never before won a Shanghai Rolex Masters second round match, had to escape three match points in the third set tiebreaker before posting a 3-6, 6-3, 7-6 (5) win in two hours, 33 minutes.
The 46th-ranked Harrison looked in position to score the victory with a 4-2 lead in the final set, but couldn't hold onto the advantage. Harrison also held a 6-3 lead in the tiebreaker, but watched as those three match points fell by the wayside. Dimitrov fought back to take the win on a 16th ace. (ANI)