The 21-year-old Aussie won in 3:43.10 seconds, just outside his own world record and just ahead of Grant Hackett and Klete Keller.
Thorpe scooped his third gold medal in four days to stretch his record number of world titles to 11.
Five-time US Olympic swimming medallist was identified as being among the Donald Trump supporters who stormed the US Capitol last week.