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.
World Championships
U.S. women set world record in 4x100m medley relay at world champs
28/07/2019 AT 13:24
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.
World Championships
'Embarrassed' Australia defend concealing Jack's positive test
28/07/2019 AT 03:03
World Championships
Peaty clinches seventh world title with 50m breaststroke gold
24/07/2019 AT 14:53