The defending champion did not face a break point and lost just 10 points in her eight service games to win in 64 minutes.
"She is a rising player from Spain and is playing well, and the conditions were windy out there, but I was able to adjust and win this match," Russian Sharapova said.
"I knew going into the match I needed to be sharp and as quick as possible, and I did a few specific things well out there, and that's about it."
Sharapova will play Sloane Stephens in the last 16 after the American teenager came from a set down to oust Kiki Bertens of the Netherlands 4-6 6-3 6-2.
Belarusian Azarenka smashed Germany's Julia Goerges 6-2 6-0 and will face Japanese Ayumi Morita next after she disposed of Urszula Radwanska of Poland 6-3 6-1.
Sharapova beat Li Na in last year's final. The Chinese, who lost in the first round in Madrid last week, beat fellow Chinese Zheng Jie 6-3 6-1.
She will next play unseeded Jelena Jankovic, who also made light work of a compatriot when she beat teenager Bojana Jovanovski 6-2 6-0.
Second round results
3-Victoria Azarenka (Belarus) beat Julia Goerges (Germany) 6-2 6-0
Ayumi Morita (Japan) beat Urszula Radwanska (Poland) 6-3 6-1
Carla Suarez Navarro (Spain) beat Romina Oprandi (Switzerland) 6-4 6-2
16-Sloane Stephens (U.S.) beat Kiki Bertens (Netherlands) 4-6 6-3 6-2
2-Maria Sharapova (Russia) beat Garbine Muguruza Blanco (Spain) 6-2 6-2
Lourdes Dominguez Lino (Spain) beat Yanina Wickmayer (Belgium) 6-4 6-4
7-Sara Errani (Italy) beat Christina Mchale (US) 7-5 5-7 6-2
9-Samantha Stosur (Australia) beat Peng Shuai (China) 7-6(5) 6-0
Jelena Jankovic (Serbia) beat Bojana Jovanovski (Serbia) 6-2 6-0
12-Maria Kirilenko (Russia) beat Varvara Lepchenko (US) 6-3 6-1
14-Dominika Cibulkova (Slovakia) beat Melanie Oudin (US) 5-7 6-1 6-3
5-Li Na (China) beat Zheng Jie (China) 6-3 6-1
13-Roberta Vinci (Italy) beat Nastassja Burnett (Italy) 6-1 6-4