The semi-finals tilt was a rematch of their clash in this year's Australian Open final, but it was nothing like the 6-3 6-0 rout registered by Azarenka in claiming the crown in Melbourne for her maiden Grand Slam title.
Each player took their turn dominating in the opening two sets before settling into an exciting battle in the third set, which Azarenka claimed with a lone service break in the last game when Sharapova sent a forehand long from deuce.
After dropping her racket in euphoric disbelief, Azarenka did her signature shuffle dance and blew kisses to the Arthur Ashe Stadium crowd after shaking hands at the net.
"I'm definitely really proud of what I achieved today," Azarenka said after her two-hour, 42-minute victory.
French Open winner Sharapova was pressured throughout the final set, taken to two deuces on her serve in the second game, to five deuces in the fourth and to four deuces in the sixth, but the Russian held Azarenka off valiantly before succumbing in the last game.
"I was just trying to find my rhythm and just fight," said Azarenka, the first player from Belarus to reach the Open final.
"I tried to give whatever it takes. Give it all."
Sharapova dominated the opening set, cracking winners off both wings from the opening game, while a surprisingly tight Azarenka registered just one winner.
Azarenka double-faulted on break point in her first service game to fall behind 2-0, and did so again in the sixth game to sink into a 5-1 hole.
Then Sharapova lost control of her serve. Serving for the set in the seventh game, the 2006 US Open winner double faulted twice in a row to hand Azarenka a service break.
After the Belarusian held serve for 5-3, Sharapova looked about to crumble again from the service line, struggling with her toss and committing back-to-back double faults before fending off two break points to end the set with an ace.
The second set swung the other way, with Azarenka belting the ball more freely and controlling play after dropping serve in the first game.
"I kind of thought that I had to turn it around and start from zero like it's a new match," she said.
Service breaks in the second and fourth games helped the world number one seize a 4-1 lead on her way to leveling the match.
Before the start of the third set, the 25-year-old Sharapova requested and received a 10-minute break under rules governing severe heat on a hot, muggy day with temperatures hitting nearly 90 degrees Fahrenheit (32 Celsius) at Flushing Meadows.
Sharapova had posted a 12-0 record this year in matches going three sets and Azarenka was 11-0 in three-setters so something had to give, and it was the Russian who failed to keep her 2012 third-set record spotless.
The Russian, who completed her Grand Slam collection by winning the French Open in June, could not withstand the groundstroke pressure applied by Azarenka, who will be seeking her second career Grand Slam singles crown on Saturday.
Sharapova took her chances but failed to convert enough of them, smacking 44 winners to just 19 for Azarenka but committing 42 unforced errors while the winner made just 19.
The Russian struggled all match with her toss and serve, committing 10 double faults.
"It's frustrating," said Sharapova, who has lost six of 10 matches against Azarenka. "She picked up her game. In the third I think a lot of it had to do with the returns. I didn't do much on her service games. She was winning them pretty easy (and) mine were quite long and I was just making too many errors."
Azarenka will meet 14-times Grand Slam champion Williams, the fourth seed, who overwhelmed 10th-seeded Sara Errani of Italy 6-1 6-2 and will be gunning for her fourth US Open crown.
Williams has won nine of 10 career matches against Azarenka.
- Sports & Recreation