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."
Sharapova 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.
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.