Phelps, whose unprecedented eight gold medals at the Beijing Games gave him 14 Olympic titles, has won the event at each of the last two Olympics and still owns the world record of 4min 03.84sec that he set at the Water Cube in 2008.
He clocked a sedate 4:14.72 to win his heat, while Lochte, the reigning world champion in the event, won his heat in 4:10.66.
Lochte, however, said the four-second gap would mean nothing in Monday night's final.
"I think that's the easiest 4:14 he's ever done," Lochte said of Phelps. "He looked really smooth. Tonight's going to be a dogfight -- and it's not just me and Michael, there's Tyler Clary, too."
Clary, who claimed silver behind Lochte at last year's World Championships in Shanghai, won his heat in 4:15.88, the fourth-fastest time of the morning.
Chase Kalisz, swimming next to training partner Phelps, was third-quickest in 4:15.78.
Phelps didn't swim the 400m medley in Shanghai. After Beijing, he said he wouldn't swim the punishing event again in major international competition.
Some solid performances at Grand Prix meetings this season prompted him to reconsider.
"It was all right," Phelps said of his preliminary performance, noting it was about a second slower than the 4:13.43 he clocked at the 2008 Olympic trials. "It felt fairly relaxed."
(For more sports news and updates, follow Ahram Online Sports on Twitter: @AO Sports / and Facebook AhramOnlineSports).