Katsuhiro Matsumoto of Japan took silver. Martin Malyutin of Russia and Duncan Scott of Britain tied for bronze.
On the podium, Scott wanted no part of sharing the moment with Sun.
Scott kept his hands clasped behind his back and refused to shake Sun’s hand, standing off on his own while the other medalists joined Sun to pose for photographers.
Sun, who served a three-month doping ban in 2014, is being allowed by FINA to compete in Gwangju ahead of a Court for Arbitration in Sport hearing in September that threatens Sun’s career.
After Sun won the 400 free, silver medalist Mack Horton of Australia refused to step on the podium or acknowledge Sun during the medals ceremony. FINA, swimming's governing body, sent warning letters to Swimming Australia and Horton for his actions.