Williams sealed her seventh straight win over Sharapova with an emphatic slam on the new blue-clay court. Azarenka overcame a shaky start to beat French Open winner Li Na 3-6, 6-3, 6-3.
The ninth-ranked Williams opened strong, hitting six aces and earning two early breaks to take the first set.
Sharapova broke at love to even the score at 2-2 in the second set, but she quickly squandered her break with a costly sixth double-fault to fall behind for good.
Williams, who improved to 11-0 on clay this year, will face either U.S. Open champion Sam Stosur or Czech Lucie Hradecka.
After Azarenka struggled on serve early on, last year's runner-up found her stride and broke her Chinese opponent's first two service games of the second set en route to pulling even at a set each.
Azarenka, who has won four titles this season, then used her powerful groundstrokes to take a 4-0 lead in the decider before holding off Li's late charge.
The Belarusian will face the winner of the quarterfinal between Agnieszka Radwanska and Varvara Lepchenko.
On the men's side, Argentina's Juan Martin del Potro beat Alexandr Dolgopolov of Ukraine 6-3, 6-4 to move on to a semifinal with either Tomas Berdych or Fernando Verdasco.
Later, top-seed Novak Djokovic plays Serbian countryman Janko Tipsarevic before Roger Federer faces David Ferrer.
- Serena Williams
- Maria Sharapova
- Victoria Azarenka