Tennis star Maria Sharapova announces retirement

She made the announcement in an essay for Vanity Fair.

After 20 years playing professionally on some of the most hallowed tennis courts around the world, Maria Sharapova is retiring from the sport that she said "gave me a life."

The 32-year-old right-handed Russian-born athlete made the announcement in an essay she penned exclusively for Vogue and Vanity Fair on Wednesday.

"I'm new to this, so please forgive me. Tennis -- I'm saying goodbye," Sharapova wrote.

"How do you leave behind the only life you’ve ever known? How do you walk away from the courts you’ve trained on since you were a little girl, the game that you love -- one which brought you untold tears and unspeakable joys -- a sport where you found a family, along with fans who rallied behind you for more than 28 years?"

Her goodbye letter to the sport took readers through her journey from early formative years starting out in Russia, moving to Florida to pursue her athletic dreams and ultimately hailed her "mental fortitude" as her strongest weapon and key to her success on the court.

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

The five-time Grand Slam winner notched her top titles at the Wimbledon in 2004 -- when she was just 17 and defeated top-seeded Serena Williams -- the U.S. Open in 2006, the Australian Open in 2008, and two French Open wins at Roland Garros in 2012 and 2014.

Sharapova, who turned pro in 2001, garnered 36 WTA singles titles and was ranked world No. 1 on five separate occasions for a total of 21 weeks in her illustrious career, according to the World Tennis Association.

A representative for Sharapova told ABC News that she will not be commenting beyond the essay at this time.

"...as I embark on my next chapter, I want anyone who dreams of excelling in anything to know that doubt and judgment are inevitable: You will fail hundreds of times, and the world will watch you. Accept it. Trust yourself. I promise that you will prevail," she wrote.

Sharapova said she will miss the daily routine, training and small moments on the side of the court like lacing up her shoes sitting beside her dad on a practice court, but wrote that the ebbs and flows, peaks and valleys have prepared her for a new terrain.

"Tennis showed me the world -- and it showed me what I was made of. It’s how I tested myself and how I measured my growth. And so in whatever I might choose for my next chapter, my next mountain, I’ll still be pushing. I’ll still be climbing. I’ll still be growing," she wrote.

Sharapova's career was not without controversy.

The tennis superstar was banned from competing for 15-months by the International Tennis Federation (ITF), the world governing body of tennis, after a urine sample of hers from the 2016 Australian Open was found to contain a drug called meldonium.

Sharapova maintained that she was unaware that the drug she had been taking for a decade, mildronate, was also known as meldonium, which became a banned substance on the World Anti-Doping Agency's list as of Jan. 1, 2016. The Russian tennis player said she had started using the drug, which helps increase blood and oxygen flow, under a doctor's guidance in 2006 because of irregular electrocardiogram results as well as a family history of heart issues and diabetes.

Upon her return to the court in Flushing Meadows, New York for the U.S. Open, the tennis champ told "Good Morning America" it was an "an incredible moment" because she knew all the ups and downs she had faced to get back on the court.