Sharapova, No. 3 in the Women's Tennis Association world rankings, made the stunning announcement as she withdrew from the WTA Rogers Cup in Montreal after her marathon second-round win over Marta Domachowska of Poland on Thursday.
"After yesterday's match I knew there was something seriously wrong with my shoulder," Sharapova said on her official web site. A scan revealed two small tears in her right shoulder.
The 2004 Wimbledon champion and this year's Australian Open winner
said: "Coming into this tournament I wasn't sure if I was going to be able to compete."
As a result of Sharapova's withdrawal, Japanese veteran Ai Sugiyama moved into the quarterfinals in Montreal.
The match against Domachowska was Sharapova's first since she was sensationally defeated by fellow Russian Alla Kudryavtseva and failed to make it into the third round of Wimbledon.
At the 2008 Summer Olympics in Beijing, Russia will be represented in the women's tennis event by Yelena Dementyeva, Svetlana Kuznetsova and Dinara Safina. Each country can be represented by up to four players per gender.
The tennis tournament runs from August 10 to 17, while the Games start with the opening ceremony on August 8 and close on August 24.