Having won the top prize at the China Open in Beijing last week, the World No 1 is into the quarter-finals in Shanghai, as he aims for consecutive Chinese titles.
He swept aside Lopez 6-2 6-3 and will now play Bernard Tomic in the final eight.
Andy Murray was forced to work hard for a three-set win over John Isner.
The world no 2 dropped the opening set in a tie-break, but gradually mastered the American’s huge serve to close out a 6-7 6-4 6-4 victory in China.
Murray will face Tomas Berdych after the Czech defeated Gilles Simon 6-3 6-3.