The 29-year-old five-time Grand Slam winner tested positive for meldonium at the 2016 Australian Open.
Her two-year ban, by the International Tennis Federation, was reduced to 15 months by the Court of Arbitration for Sport (CAS) and she will play her first match in Stuttgart on April 26 -- the day her ban expires.
In the past, Stuttgart has been a happy hunting ground for Sharapova, who has lost just once -- to world number-one Angelique Kerber in 2015 -- at the WTA tournament and won the title in 2012, 2013 and 2014.
"I could not be happier to have my first match back on tour at one of my favourite tournaments," said Sharapova, a former world number one, in a press release.
"I can't wait to see all my great fans and to be back doing what I love."
WTA CEO and Chairman Steve Simon said: "Maria is eligible to return to professional tennis beginning on April 26.
"This will be the Porsche Tennis Grand Prix in Stuttgart’s 40th anniversary and I'm sure the fans there will be excited to see her play."
Sharapova has been given a wildcard to appear in Stuttgart.
"I'm really happy for Maria that she's back after a long break. Particularly pleasing for me is that it's going to be our audience that gets to watch her comeback live," said tournament director Markus Guenthardt.
Kerber will be defending her title in Stuttgart with eight of the world's top 10 scheduled to play in this year's tournament.