Milak touched the wall in a time of 1:50.73 ahead of Japan's Daiya Seto (1:53.86) and South African Chad le Clos (1:54.15).
The 19-year-old's new record broke American great Michael Phelps' mark of 1:51.51 set at the World Championships in 2009.
Speaking at the event, Milak said: "It’s a tremendous honour to beat such a great men’s world record.
When I turned back and I saw the time, 1:50.73? All the pressure and tension just went off my back and all the joy came out.
Phelps still holds world records in the 100m butterfly and 400m individual medley - and he regained his 100m fly world record 24 hours after Milorad Cavic took it from him a decade ago.