Sun competed for China at the 2008 Summer Olympics. In 2010, he won the 1500 metre freestyle at the Asian Games, setting a new Asian record. At the 2011 World Championships, he beat the 1500 metre freestyle world record, which was previously held by Grant Hackett in 2001 and the longest-held world record in swimming at the time. Sun won gold medals in the 400 and 1500 metre freestyle at the 2012 Summer Olympics. At the 2013 World Championships, he became the second swimmer, after Hackett, to win gold medals in all three long distance freestyle events (400, 800, and 1500 metres) in a single World Championship.