The second-ranked Azarenka rallied after dropping the first set to dominate the second before going to a tiebreaker in the final set, finally outlasting Williams 2-6, 6-2, 7-6 (8-6) in a classic 2 1/2-hour struggle.
The Belarusian stormed back in the tiebreaker to win four of the final five points, notching only her third triumph in 15 career meetings with the 16-time Grand Slam titlist Williams.
She also bested the American star in the Doha final in February.
Azarenka was forced into the tiebreaker after Williams rallied from a 4-2 deficit in the third set.
Swim Week Miami Beach 2014 [PHOTOS]