Sharapova was leading Mirjana Lucic-Baroni 4-6, 6-3, 2-1 when she called it quits. She came back with her left thigh taped.
"I'll focused on my match", Sharapova said on Monday.
Sharapova will learn on Tuesday if she is to be given a wildcard for the French Open, having only returned from a 15-month doping ban last month.
Sharapova, 30, has played in three events since her 15-month ban for using meldonium ended in April.
She now has enough ranking points to enter qualifying for Wimbledon.
Italian Open organisers were the first to offer Sharapova a wild card, and they were criticised for not giving one to former French Open champion Francesca Schiavone, an Italian. Fellow players have shamed her and blasted tennis officials for facilitating her smooth passage back into the sport, and journalists have constantly been asking prickly questions about her delicate situation.
Sharapova was recently eliminated by Canadian Eugenie Bouchard from the second round of the 2017 Madrid Open.
The five-time Grand Slam champion will now not need a wildcard to assure her involvement at the event, with her ranking set to rise to roughly No. 170 in the world.
'I Call Turbo Bullsh*t': John Oliver Shares His Thoughts on James Comey
According to the White House, Comey was sacked late Tuesday on the recommendation of the deputy attorney general Rob Rosenstein. But on Thursday, President Trump asserted in an NBC interview with Lester Holt that he had planned to fire Comey regardless.
Sharapova's absence leaves the women's French Open field wide open with Serena Williams, a three-time champion in Paris, sitting out the rest of the season as she prepares to give birth to her first child. They might be disappointed, she might be very disappointed, " Giudicelli said. She needed to go deep in Rome to get above the Wimbledon main draw cut line, so the loss means she'll need a wild card from the tournament to avoid playing qualifying. Maria won twice here, but we have a huge responsibility.
"Speaking after his 7-6 (7/2) 6-2 second-round victory over Britain's Aljaz Bedene in Rome, Djokovic said at a press conference: "(It) must be tough for her, but it's the way it is, in some tournaments she's going to get that help in wildcard and invitation; some not.
In an open letter addressed to his fans on rogerfederer.com, he explained his absence from Roland Garros was part of his bid to "try and play on the ATP World Tour for many years to come".
Dimitrov double-faulted to hand Del Potro the key break in the third set and then smashed his racket on the clay. But a place in the semifinal would be a bigger boost for her as it would take her into the main draw at SW19.
She said that her team did not check the updated banned substance list and hence she tested positive for the drug at the 2016 Australian Open.
Tomas Berdych, the number 12, beat German Mischa Zverev 7-6 (9-7), 6-4 while Jan-Lennard Struff put out Australian Bernard Tomic 6-7 (6-8), 6-1, 6-4.
Also, fifth-seeded Johanna Konta defeated Yulia Putintseva 6-3, 6-0; Ekaterina Makarova eliminated Roberta Vinci 6-2, 6-1; and qualifier Catherine Bellis beat Misako Doi 6-4, 7-6 (6).