The five-time Grand Slam champion and former No 1 beat Roberta Vinci 7-5, 6-3 in the opening round of the Porsche Grand Prix yesterday.
Sharapova had earlier been given a lukewarm welcome by the 4,500 spectators, receiving a polite applause and some whistling when she entered the sold-out arena.
"It was the best feeling in the world," Sharapova said about finally stepping on court again for a professional match. "I have been waiting for this a long time."
Yesterday's match was the Russian's first since losing to Serena Williams in the quarterfinals of the 2016 Australian Open, and her first match on clay in nearly two years.
More From This Section
Against the 36th-ranked Italian, Sharapova had a shaky start, conceding seven of the first eight points and dropping the opening two games within five minutes.
She finally took her fifth chance in the third game to break Vinci's serve.
Apart from producing a string of unforced errors, Sharapova also showed flashes of her old self - with several outstanding returns and cross-court winners, mostly followed by her trademark fist pump.
The Russian, however, broke again and converted her second set point with a forehand winner to take the opener. Sharapova took control of the second set after an early break and held off three break points in her following service game. She dropped only two points on serve in the rest of the match and closed out the win on Vinci's serve.
Last year, Sharapova tested positive for the banned substance meldonium. She had her initial two-year ban reduced to 15 months by the Court of Arbitration for Sport, which ruled that the Russian bore "less than significant fault" in the case and that she could not "be considered to be an intentional doper."
As a result of the suspension, Sharapova lost her ranking. But the three-time winner from 2012-14 was given direct entrance to the main draw of the Stuttgart event. Organizers in Madrid and Rome followed the example and handed her a wild card for their events in May as well.
Several players, including Vinci, have criticized the invitation for a player who has been caught doping.
Earlier yesterday, Sharapova completed a one-hour training session on an empty center court. Because her suspension ended only at midnight, she had not been allowed to use official tournament facilities before, forcing her to visit a local tennis club in Stuttgart for training since last weekend.
Sixth-seeded Johanna Konta defeated Naomi Osaka 7-6 (5), 3-6, 6-1, while Carla Suarez-Navarro and Elena Vesnina also advance.
Simona Halep became the first player to reach the quarterfinals after beating Barbora Strycova 6-2, 6-3.