The Spaniard, who saved two match points in a testing opening match against Lucas Pouille, was imperious under pressure as he fended off all six break points he faced.
He will face John Isner in the last eight after the American sixth seed thrashed Leonardo Mayer 6-0 6-3.
China Open men's results
Zverev stuns Nadal to reach Madrid semi-finals
1-Rafa Nadal (Spain) beat Karen Khachanov (Russia) 6-3 6-3
6-John Isner (US) beat Leonardo Mayer (Argentina) 6-0 6-3
Nadal: Covid-19 pandemic made me question if I should keep playing
Highlights: Nadal beats Popyrin to reach Madrid quarters