Serving at 4 all, 30-15, Wozniacki won a 19 stroke rally after hitting a forehand down the line lob winner. The Dane then went ahead 5-4 after Sharapova struck a crosscourt inside out backhand long.
Serving to stay in the set, the Russian double faulted then hit two forehand errors to face setpoint at 15-40. Sharapova then netted a crosscourt forehand in her 21st unforced error of the set to drop her service game and the set after 29 minutes of play.
In set two, Sharapova reduced her unforced error count and struck several baseline and swinging volley winners to take a 5-1 lead.
Wozniacki saved two set points before Sharapova converted her third set point after striking a down the line forehand winner.
During the following ten minute heat break between the second and third sets, Sharapova returned to the court after twelve minutes and was given a time violation warning from the chair umpire.
After holding serve twice, Wozniacki took a 2-1 third set lead.
With Sharapova serving, Wozniacki struck a down the line backhand winner to lead 15-0. Sharapova committed two backhand errors to trail 0-40.
The Russian then netted a crosscourt backhand volley to lose serve and trail 1-3. Wozniacki held serve to lead 4-1.
Two 108 miles per hour down the tee aces from Sharapova coupled with two baseline errors from Wozniacki resulted in a love service game hold from the Russian to reach 4-2.
With Wozniacki serving, Sharapova struck a crosscourt forehand wide before netting three crosscourt backhands to put the Dane ahead 5-2.
Serving to stay in the match, Sharapova struck a crosscourt forehand wide followed by a crosscourt backhand wide to fall behind 15-40 and face match point.
Wozniacki hit a down the line backhand winner to break serve and end the match after 2 hours and 37 minutes of play.
Wozniacki, who won five of the last six games, finished the match with 22 winners to 17 unforced errors while Sharapova would finish with 39 winners to 43 unforced errors.
In set three, Wozniacki had committed only five unforced errors.