"We're heartbroken for you, Serena. Our seven-time singles champion is forced to retire from The Championships 2021 through injury," Wimbledon said on Twitter.
The 39-year-old sixth seed suffered the injury in a women's singles first round match Tuesday against her Belarusian opponent Aliaksandra Sasnovich.
Williams burst into tears as tennis fans applauded and cheered for her while she was walking off the court to receive treatment.
She retired from the Championships at 3-3 after 34 minutes at the All England Club.
Sasnovich, 27, automatically qualified for the second round.
One of the greatest tennis players of all time, Williams won 23 Grand Slam titles in singles.
She has seven Wimbledon titles, last winning it in 2016.