Williams said she couldn't "physically serve" with the pectoral problem, adding she felt the injury during her third-round singles match against Julia Goerges on Saturday and during Sunday's doubles tussle with older sister Venus.
"I unfortunately have been having some issue with my pec muscle", the tournament's press office quoted Williams as saying.
"It is hard to play when I can't physically serve".
The French Open marked only Williams' third tournament of 2018 - and first since March - after she gave birth to daughter Olympia in September.
Williams' withdraw is just another similarity she shares with Sharapova.
The possibility of Williams facing Sharapova had been grabbing attention since the draw was made at Roland Garros 10 days ago. "The first time I felt it was against Görges in my last match".
Despite her win, as Williams approached the final round, it appeared increasingly hard for her, although spectators and fans continued to cheer her on.
Roseanne says she 'begged' ABC to save her show
However, differing from his similar Wednesday tweet demanding an apology, the president seemingly mentioned Roseanne fans. In addition, Roseanne Barr's firing from the network left stars of other ABC television shows extremely happy.
Facebook to pull plug on 'Trending' topics feature
Facebook introduced a feature called Trending in 2014, and you can probably guess what it did even if you never touch Facebook. It fit nicely into CEO Mark Zuckerberg's pledge just a year earlier to make Facebook its users' "personal newspaper".
Houston police officers anxiously wait outside Shipley's on National Donut Day
The pizza delivery chain will debut its caramel creme-filled doughnut holes, with a free order alongside any pizza order. Do I have one near me? At Krispy Kreme , you can just walk in and get a free donut in the USA and Canada.
However, the 23-time Grand Slam victor will now have to focus on making a recovery in time for the start of the grass-court season. "It's a match I always get up for". I tried a lot of different tapings and support.
"So I'm going to get an MRI tomorrow".
But many fans feel this latest inquiry fired at Serena - which is now a moot point since she dropped out of the French Open earlier today because of an injury - is probably the most preposterous. It didn't get a lot better. Williams also is not sure when she will be able to return to action, leaving her Wimbledon status in doubt with just a month before the next slam begins.
"I think Serena can get close to winning another Grand Slam. It hasn't been easy", she said.
The big question here is whether Williams will be ready by Wimbledon, which presents her best chance to win what would be a record-tying 24th major.
In his article, he wrote: "I asked Serena about comments President Donald Trump made to me in 2004 about her and Maria Sharapova". Her opponent will advance to the quarterfinals.
The Russian, a two-time French Open champion, will face either 2016 victor Garbine Muguruza or Ukraine's Lesia Tsurenko in the last eight. "I've pretty much had every injury in the book [but not this]", she said.