"I played really well in the beginning and got a little tense in the second set," Sharapova said. "But I felt like I really needed that challenge."
Azarenka looks to rebound from her trip last week to Tokyo, when she withdrew from the tournament after a bout of dizziness in the third round.
In men's singles, Sam Querrey of the U.S. defeated Andreas Seppi 6-1, 6-4. He'll face Feliciano Lopez, who topped Yen-hsun Lu 6-3, 7-6 (7). Mikhail Youzhny of Russia defeated Kevin Anderson of South Africa 6-3, 6-3.
Local wild card Zhang Ze upset fifth-seeded Richard Gasquet of France 6-4, 3-6, 6-4. Zhang, China's highest ranked player at 165th, has reached his first quarterfinals.
Gasquet won the Bangkok title last week.