The second-seeded Sharapova posted a 6-4, 6-3 victory to reach the fourth round. She won this tournament in 2006 and 2013 and lost to Azarenka in the 2012 final.
Former Indian Wells champion and No. 4 seed Caroline Wozniacki lost 6-4, 6-4 to 31st-seeded Swiss Belinda Bencic. Wozniacki titled here in 2011 and was a runner-up twice.
Bencic, 18, failed to win a game off Wozniacki last year in Istanbul.
The teenager will face 2010 Indians Wells champion Jelena Jankovic in the fourth round. The 18th-seeded Serbian rallied to beat 16th-seeded American Madison Keys 5-7, 6-4, 6-3.
No. 5 seed Ana Ivanovic of Serbia, the 2008 Indian Wells winner, was beaten 6-2, 5-7, 6-2 by 25th-seeded Frenchwoman Caroline Garcia.
Sixth-seeded Canadian star Genie Bouchard cruised into the round of 16 by getting past 30th-seeded American Coco Vandeweghe, 6-3, 6-2.
"I felt very solid today. That's important against player with big weapons -- I told myself to be ready for anything," Bouchard said. "She had some great serves and some great forehands, and I was just ready for that. I was really going to try and neutralize that and take my chances when I had them.
"I'm happy I was able to step in and attack whenever she let up a bit out there."
Up next for the 2014 Wimbledon runner-up Bouchard will be rising Ukrainian Lesia Tsurenko, who upended 20th-seeded Frenchwoman Alize Cornet 7-5, 1-6, 6-2.