The Russian retires at the age of 32 having last won a grand slam in 2014 when she clinched the French Open for the second time.
Her last appearance came at the 2020 Australian Open, where she was knocked out in the first round by Donna Vekić.
In her article, Sharapova said she was "saying goodbye" to tennis.
"In giving my life to tennis, tennis gave me a life," Sharapova wrote.
"I'll miss it everyday. I'll miss the training and my daily routine: Waking up at dawn, lacing my left shoe before my right, and closing the court's gate before I hit my first ball of the day. I'll miss my team, my coaches. I'll miss the moments sitting with my father on the practice court bench. The handshakes—win or lose—and the athletes, whether they knew it or not, who pushed me to be my best."
Rivalry and setback
Sharapova moved to Florida, US, aged just seven in 1994 to receive professional training.
She burst onto the tennis scene as a 17-year-old in 2004 when she beat No.1 seed Serena Williams in the final of Wimbledon to claim her first grand slam.
She rose to the summit of the world rankings for the first time in 2005 and alongside her Wimbledon title, has won two French Open titles, one Australian Open, and a US Open title.
Sharapova also lost to long-time rival Williams in three other grand slam finals.
In 2016, she tested positive for banned substance meldonium at the Australian Open. She was initially banned for two years, before the ban was reduced to 15 months after an appeal. Returning to action in April the following year, she has since been unable to hit the heights from the start of her career.
'My body has become a distraction'
"Looking back now, I realize that tennis has been my mountain," she said. "My path has been filled with valleys and detours, but the views from its peak were incredible.
"After 28 years and five Grand Slam titles, though, I'm ready to scale another mountain—to compete on a different type of terrain."
She spent five different stints at the top of the world rankings, as well as receiving a number of high-paid endorsements from brands such as Nike.
After returning to the top in 2012, Sharapova made her Olympic debut in London where she finished with the silver medal, losing in the final to Williams.
Off the court, Sharapova was busy building a business empire, creating a candy production company -- Sugarpova -- as well as being co-owner of Supergoop, a sunscreen company.
Injuries eventually took their toll on the Russian, though. She suffered a number of shoulder injuries, and before last year's US Open, she recognized the end of her career might be near.
"Behind closed doors, thirty minutes before taking the court, I had a procedure to numb my shoulder to get through the match," Sharapova, now ranked 373 in the world, wrote in her farewell article.
"Shoulder injuries are nothing new for me -- over time my tendons have frayed like a string.
"I've had multiple surgeries -- once in 2008; another procedure last year -- and spent countless months in physical therapy. Just stepping onto the court that day felt like a final victory, when of course it should have been merely the first step toward victory. I share this not to garner pity, but to paint my new reality: My body had become a distraction.
"Throughout my career, Is it worth it? was never even a question -- in the end, it always was. My mental fortitude has always been my strongest weapon. Even if my opponent was physically stronger, more confident -- even just plain better -- I could, and did, persevere."
Rival Petra Kvitova -- who beat Sharapova in the 2011 Wimbledon final -- hailed the Russian as a "big champion."
"I know how tough it is to come back and play," she said on Twitter. "She has been injured a lot. Of course she wanted probably bigger success than she really paid or her body allowed her to have.
"It was pleasure to be with her on the tour, sharing the court with her. It was always great battles when we play together. So it's been always nice to share the court with her and I do always have respect to her."