The fifth-seeded Stosur had lost all of her previous eight matches against Azarenka, winning only two sets.
The title was Stosur's third in her career and the first since she won her only major, the 2011 U.S. Open.
Azarenka, the two-time Australian Open champion, played another loose match. She committed 32 unforced errors, including seven double faults, and had only 11 winners.
Stosur, playing in her first final since October, hit 20 winners compared to 29 unforced errors, but played the key points well, including saving 11 of 12 break points.
Stosur, ranked No. 13, requested and was granted a wild-card into the event after she lost her opening-round match last week at Stanford in the Bank of the West Classic. Stosur had victories over No. 4-ranked Agnieszka Radwanska and the third-ranked Azarenka, the first time she has defeated two top-five players in an event since the 2011 WTA Championships.
Azarenka, who will move into the No. 2 ranking ahead of Maria Sharapova on Monday, was playing her first tournament since withdrawing from Wimbledon because of a right knee injury before her second-round match.
Azarenka, from Belarus, set the tone early when she didn't win a point on her first service game of the match, including consecutive double faults to give Stosur a 2-0 lead. She then scored her only break of the match on Stosur's serve in the next game before the Aussie broke back for a 3-1 lead.
In a key game of the set, Stosur fended off five break points in the next game to hold her serve and take a 4-1 lead en route to winning the set.
Stosur held a huge advantage with her serve in the set over one of the game's best returners. Stosur, who had six aces, won 73 percent of her first serves compared to Azarenka, who won just 43 percent. Azarenka was even worse on her second serves, winning only 30 percent.
Azarenka improved her game slightly in the second set as the pair were on serve until Stosur struck with the only service break in the sixth game for a 4-2 lead.
Stosur improved her record in finals to 4-12.