Sun, the reigning world and Olympic champion and world record holder, was the hot favourite for gold but did not show up at the starting blocks despite having warmed up for the race.
Italy’s Gregorio Paltrinieri won the gold in Sun’s absence.
“I feel very sorry that I couldn’t be present for the 1500m,” Sun told reporters.
“I didn’t feel good in my heart. Today I felt really uncomfortable at the pool during my warm-up and I had to give up the idea of competing. I feel really sorry about that.
“It happened after the warm-up as I was preparing for the competition. It is the first time I have felt uncomfortable in competition.”
In a separate incident in morning training at the pool, Brazil head coach Alberto Pinto confirmed that Sun had attacked Brazilian swimmer Larissa Oliveira.
The Brazilian Aquatic Sports Federation made a formal complaint to FINA, swimming’s world ruling body, Globo杭州桑拿会所, reported.
“I have no comment because it was a morning problem,” Sun said.
Paltrinieri was shocked by Sun’s absence.
“I never saw him today,” the Italian told reporters.
“We were speaking yesterday together and that the race would be a nice one. It was really disturbing to swim without him.
It was a really tough race without him.”
The 23-year-old Sun won the 400m and 800m freestyle titles and finished second in the 200m at the championships.
Despite Sun’s feats in the pool he has been a polarising and controversial figure on dry land and his withdrawal from the final was just the latest in a series of incidents.
At London in 2012, Sun became the first Chinese man to win an Olympic swimming gold medal when he took the 400m and 1,500m freestyle double, getting a reprieve after a false start in the heats.
In the three years since, however, his life has been troubled.
In 2013 he found himself in hot water with Chinese swimming officials for missing training sessions and was suspended from engaging in any commercial activities, which had flooded in after his Olympic success.
He then fell foul of the law and spent a week in jail for crashing a car that he had driven without a licence.
China’s swimming authorities responded by slapping a blanket suspension on him, banning him from training and competition.
It emerged last year that Sun had secretly served a three-month ban after testing positive for a banned stimulant.
The China Anti-Doping Agency could have imposed a longer ban but opted for a lenient punishment because Sun had been given medication by a doctor to treat a heart issue and was unaware it had been added to the World Anti-Doping Agency’s banned list.
(Writing by Julian Linden; editing by Martyn Herman and Ed Osmond)