The 30-year-old Russian was given a wildcard into the tournament by the US Tennis Association (USTA), a move critics complained about earlier in the season but another key step in the road back for the five-time Grand Slam winner.
"When it comes to tennis, good or bad -- there's really only one thing that I know for certain -- I've missed it," Sharapova wrote on the Players' Tribune website. "Though these last two years have been tougher so much tougher than I ever could have anticipated... my passion for the game has never wavered. If anything, it has only grown stronger."
Sharapova was issued a two-year suspension after testing positive for the banned heart and blood boosting drug meldonium at the 2016 Australian Open, but the Court of Arbitration for Sport reduced the ban on appeal.
She said that she had taken it for several years and did not know it had been placed on the banned list at the start of 2016. Sharapova made her return in April at Stuttgart, reaching the semi-finals as a wildcard, but such invitations sparked criticism from some WTA rivals, saying she should have to work her way back without such benefits, some suggesting a life ban.
"I'm aware of what many of my peers have said about me and how critical of me some of them have been," she wrote. "If you're a human being with a normal, beating heart... I don't think that sort of thing will ever fully be possible to ignore."
Sharapova was refused a wildcard by French Open organizers and missed Wimbledon with a thigh injury, so the US Open will be her first Grand Slam event since last year's Australian Open.
Shaking off criticism after the French Open snub, Sharapova tweeted, "If this is what it takes to rise up again, then I am in it all the way, everyday. No words, games or actions will ever stop me from reaching my own dreams. And I have many."
Sharapova has missed three of the past four US Opens, her last visit ending in the 2014 fourth round.
The USTA defended its wildcard offer, saying, "Her suspension under the terms of the tennis anti-doping program was completed and therefore was not one of the factors weighedin our wildcard selection process."
"Consistent with past practice, a wildcard was provided to a past US champion who needed the wildcard for entry into the main draw." Former world number one Sharapova won the 2006 US Open as well as Wimbledon in 2004, the 2008 Australian Open and the 2012 and 2014 French Opens.
"I'm sure this is a great moment for her to have an opportunity to be back to a place where she has done so well," seven-time Grand Slam champion Venus Williams said.
Sharapova was bolstered by fans with "Welcome back Maria" signs in Germany and cheering support last month in Stanford, her first US match in more than two years.
"I feel like I just want to hug everyone and say thank you," Sharapova said. Sharapova defeated American Jennifer Brady 6-1, 4-6, 6-0 in her Stanford opener but suffered a left forearm injury and has not played competitively since. "I feel like I'm playing catch-up against everyone who has had a head start," she said of being hurt during US Open tune up events.