The Russian lost her first three-set match this year as she was beaten by the world number one inside Arthur Ashe Stadium on Friday.
"This one didn't go my way," Sharapova said. "Frustrating, but it's the game of tennis. A lot of swings in the match today. [I] certainly had the lead and the advantage. I gave her too many free points."
Azarenka will now meet Serena Williams on Saturday to battle it out for the final Grand Slam of the year.