Phelps, 23, won the fourth and final heat in an Olympic-record time of 4:07:82, shaving 0.44 seconds off the mark he set in the event at the Athens Games in 2004. Among the seven swimmers qualifying for the final is Brian Johns of Richmond, B.C., who finished seventh in qualifying with a Canadian-record and personal-best time of 4:11.41.
Calgary's Curtis Myden set the previous Canadian record in the event at the 2000 Sydney Games in a bronze-medal performance.
Laszlo Cseh of Hungary, who earned a bronze medal in the event in Athens, posted the second-fastest time overall in 4:09.26. Italy's Luca Marin finished third in 4:10.22, while American Ryan Lochte was fourth in 4:10.33.
Phelps, who won gold in the 400 IM at the Athens Games, is attempting to break the the record of seven total gold medals in swimming set by fellow American Mark Spitz at the 1972 Games in Munich.
The American won eight total medals in Athens, with six gold.
Phelps holds the world record in the 400 IM — one of six held by the native of Baltimore, Md. His time of 4:05.25 at the US Olympic team trials in Omaha, Neb., eclipsed his previous mark set at the 2007 World Championships in Melbourne, Australia, by more than second.
The final in the 400 IM takes place Sunday.