You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
Siberia-born Sharapova, whose Wimbledon victory over Serena Williams in 2004, aged 17, propelled her to superstardom and riches, broke the news in an article for magazine Vanity Fair.
"I'm new to this, so please forgive me. Tennis -- I'm saying goodbye," Sharapova, whose rags to riches story captivated the sporting world but turned sour when she was banned for doping, wrote in a farewell article.
Her decision to quit is hardly a major surprise as she has been a pale imitation of her former self since returning in 2017 from the 15-month ban for taking prohibited heart drug meldonium at the 2016 Australian Open.
The former world number one has played only two matches this year, losing in the first round of the Australian Open, with her ranking sliding to 373.
"Looking back now, I realise that tennis has been my mountain. My path has been filled with valleys and detours, but the views from its peak were incredible," she said.
"After 28 years and five Grand Slam titles, though, I'm ready to scale another mountain, to compete on a different type of terrain."
Sharapova, whose trademarks were her ferocious intensity and pounding groundstrokes, completed her career Grand Slam when she won the French Open in 2012. She also won at Roland Garros again in 2014, her last major title.
She became the first Russian woman to reach number one in the rankings in 2005 and claimed the U.S. Open title in 2006. She also won the Australian Open in 2008.
"It's a shame, of course, because Maria was a role model for everyone," Shamil Tarpischev, president of Russia’s Tennis Federation, told RIA news agency.
"Many girls compared themselves to her. She was number one for the popularisation of Russian tennis. Her image was huge."
WTA Tour chairman Steve Simon added: "She will be greatly missed by her millions of fans around the world."
Sharapova, who grew up in Sochi, was spotted playing at a tennis camp in Moscow by former great Martina Navratilova and moved with father Yuri to Florida with little money and no English, claimed 36 titles.
But injuries, especially her shoulder, blighted her career.
A torn rotator cuff in 2008 required surgery and she was out for six months, dropping her outside the top 100.
Showing the tenacity that marked her career, she battled back though and her two French Open titles on a claycourt surface she once loathed earned Sharapova admiration.
Her career took a dark turn in 2016.
After an 18th consecutive defeat by Serena Williams, in the quarter-finals of the Australian Open, Sharapova failed an anti-doping test and was initially banned for two years by the International Tennis Federation (ITF).
Sharapova claimed she had not realised that meldonium, which she said she had taken for health issues throughout her career, had been added to the World Anti-Doping Agency's banned list.
Her ban was eventually reduced to 15 months and she returned to action in April 2017 after being handed wildcards at several events, which drew criticism from some fellow players.
Later that year she won the Tianjin Open, the last title of a storied career that earned her $38.7 million in prize money -- a figure dwarfed by off-court earnings that according to Forbes made her the highest-paid female athlete for 11 years in a row.
The all-too-frequent career breaks, gave Sharapova time to establish a confectionary company called Sugarpova, from which some of the proceeds go to the Maria Sharapova Foundation -- a charity set up to help victims of the 1986 Chernobyl nuclear accident from which her parents fled.
While that will keep her busy, Sharapova said the thrill of competition will be missed.
"In giving my life to tennis, tennis gave me a life," she said. "I'll miss it every day, I'll miss the training and my daily routine."