Williams won by scores of 6-2, 2-6, 7-5 at Arthur Ashe Stadium in Flushing Meadows. N.Y.
It is her 15th Grand Slam singles title, but it almost didn't happen after Azarenka served at 5-4 for a chance to win her second major of the year.
Instead, Williams capped off a dominant summer that also included wins at Wimbledon and the London Olympics. She has gone 23-1 since a first round exit at the French Open.
It was the first three-set women's final in New York since 1995, and the first time since 1985 a women's final went past 5-5 in the third stanza.
The men's final takes place Monday between defending champ Novak Djokovic and Andy Murray.