The 33-year-old tennis star had been set to play Klara Koukalova in the second round at Båstad in southern Sweden, having defeated Ysaline Bonaventure of Belgium 6-2, 6-1 in her opener on Wednesday at the claycout event she won in 2013.
“I was having some pain in my right elbow,” Williams said.
“I felt a little bit in my match [on Wednesday] and then it got better, but [on Thursday] morning I really couldn't hit serves, and if I'm not able to hit serves that could definitely be a problem.”
“So I talked to my coach about it and we were like, 'Let's see what the doctor says, and see what everyone else says, and go from there'. The main thing is that we don't want it to get worse, we obviously want it to heal.”
“Unfortunately I haven't had time to heal. I've been going, going, going, playing tournaments I love, and coming here has been such a great joy, but unfortunately it's not going to heal if I keep playing.”
The coastal town of Båstad is best known for the tennis tournament, held each summer since 1948. The city has has the most tennis courts in the country and has fostered many internationally successful tennis players.
The town attracts some 20,000 visitors during this time, including Sweden's newest royal couple, Prince Carl Philip and Princess Sofia, who married in a lavish ceremony last month. The pair first laid eyes on each other on a night out in Båstad back in the summer of 2009.
And Williams did seem to enjoy her brief spell in the town, even posting a picture of herself enjoying the Swedish summer on the beach on social media.
Williams swept to a sixth Wimbledon title on Saturday, her 21st career major and her third in three Grand Slam events this year.
If she defends her US Open crown in September, she will become the first woman since Steffi Graf in 1988 to complete a calendar Grand Slam.
“I'm going to take some time off, I'm going to get some treatment, and I'm going to continue to do things for it. I'll do what's best for my body and continue from there,” Wiliams told www.wtatour.com.
Elsewhere in Båstad on Thursday there were wins for third seed Barbora Strycova who beat Evgeniya Rodina, 6-4, 6-1; Sweden's Rebecca Peterson seeing off sixth seeded Katerina Siniakova, 7-5, 7-6 (8/6), and Yulia Putintseva defeating French qualifier Alize Lim, 6-0, 1-6, 6-2.
The last match of the day saw seventh seed Johanna Larsson edging Anna-Lena Friedsam, 6-3, 7-5.