The five-time Grand Slam winner has not played since suffering the injury during her second-round match at the Italian Open on May 16.
"After an additional scan, the muscle tear that I sustained in Rome will unfortunately not allow me to compete in the grass court tournaments I was scheduled to play," Sharapova wrote on Facebook. "I will continue to work on my recovery and my next scheduled tournament is in Stanford."
The Bank of the West Classic in Stanford, Calif., begins on July 30.
Sharapova was slated to play the qualifying rounds at Wimbledon after she elected to forgo any requests for a main-card invitation into the All England Club. Sharapova, who won Wimbledon in 2004, made this decision after the French Tennis Federation denied her entry into the French Open on the heels of a 15-month doping ban for testing positive for meldonium at the 2016 Australian Open.
Sharapova, who is ranked 178th in the world, has played in three events since her return from suspension. She reached the semifinals in her first tournament at Stuttgart, but won only a single match in Madrid and Rome, where she withdrew in the third set against Croatian Mirjana Lucic-Baroni because of the injury.