The Russian, who was to be the No.3 seed this fortnight, made the announcement through Facebook:
Sharapova's last tournament came at Wimbledon, where she made it to the semifinals before falling to eventual champion Serena Williams. She injured her leg right before the Rogers Cup in Toronto and Western & Southern Open in Cincinnati, forcing her to withdraw from both Premier 5-level tournaments.
Sharapova will be directly replaced in the draw by 18-year-old Russian Daria Kasatkina, a lucky loser into the draw. Kasatkina will play Sharapova's original opponent, WTA Rising Star Daria Gavrilova.
About 45 minutes after making the announcement, Sharapova posted a message on her official website, mariasharapova.com, which she wrote in the car after her practice session earlier in the day.
"I don't want to get up from this chair, but I know this is the end of my US Open campaign... In the meantime, let's celebrate what we already have and now what we are missing," Sharapova wrote.
"New York City, this wasn't my year but I will be back!"
Click on the link in the below tweet to read the five-time Grand Slam champion's statement in full: