The former world No.1, yet to advance beyond the quarter-finals at any event this season, revealed afterwards on Saturday that she's battling a virus and had her temperature and blood pressure checked after losing the opening two games of the deciding set.
After taking pills, Swiatek initially continued, but she looked lethargic and pulled the plug trailing the American Li 6-7 (4-7) 6-2 0-3 0-30 before walking off the court in tears.
"The last two days were pretty terrible," said the Pole. "I think I have some virus.
"It's been some hours fine, some hours pretty bad. I heard there is something going on between players, that the virus is somewhere on site. I'm sure I'll be fine in a couple of days, but I had zero energy.
"I just felt really bad physically, and yesterday, even worse. I thought maybe today it's going to be better – maybe it was, but not enough to play a match."
Swiatek looked to have turned the contest around after losing a tight opening set but it was no surprise when she called it a day given her demeanour in the third set.
Asked if she considered not taking to the court at all, the fourth seed said: "I knew that it was going to be hard but I still wanted to try.
"In the third set, I started feeling a little bit dizzy and not really co-ordinated. I couldn't really drink anything because I just felt like I'm full constantly, and the energy went down drastically."
Swiatek will now focus on recovering before turning her thoughts to the Italian Open in Rome next month, where she will hope to find form under new coach Francisco Roig ahead of Roland Garros.
"It's sad for me that I can't play because I was feeling really good with my game, and I was moving forward in the process," she said.
"The tournament has just started. I couldn't even compete today, so it's disappointing."
It has also been a difficult season for two-time grand slam finalist Jasmine Paolini and she crashed out in the third round, losing 7-5 6-3 to American Hailey Baptiste.