Caeleb Dressel on the way to gold in the 50m butterfly in Budapest. AFP
Dressel, 25, pulled out of the 100m freestyle on Tuesday after finishing second fastest in the heats. On Wednesday, he quit the remaining competition.
"He's withdrawn for medical reasons. For his long-term health that's the right decision to make today," Lindsay Mintenko, the Swimming Managing Director for the USA team, told media at the start of the evening session.
"He's just not to compete right now."
She said for legal reasons she could not be more specific on the problem.
"Ultimately this is Caeleb's decision," she said.
Dressel won five gold medals in the Tokyo Olympics and had already collected two, in 50m butterfly and the 100m freestyle relay, in Budapest.
He had been due to race in the mixed medley relay on Tuesday, but did not swim. The US quartet, fifth in Tokyo with Dressel on the butterfly leg in Tokyo, this time took gold,
"We needed to make a quick decision. He obviously has a lot of events left," said Mintenko.
"We had to make a really tough decision last night about an hour before (the relay) competition, his team-mates stepped up and won the gold medal."
"It needed to be a quick decision made in conjunction with him, the medical staff and the coaches. It was the right decision for his long-term health and that's ultimately what we're here for."
"It's obviously hard. Caeleb's worked really hard for this. Any time you come to a world championships... and you can't compete it's really hard."
"Hopefully it's quick and he'll be able to recover and be back on his feet soon."
Asked if he had already left Budapest. she said: "Yes, he's in the process of it."
Ahead of the championships, Dressel told a US video interviewer Graham Bensinger that he "felt so lost" after winning five golds in Tokyo in part because he had not hit his target times.
"I wanted to get away from the water, but then that's also one of my safe places. So it was, again, a rock and hard place. Yeah, it was a pretty miserable couple months," he said.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)