Phelps, the defending champion, was eighth fastest into tonight's final, edging out Beijing silver medallist Laszlo Cseh in a major surprise.
Beijing 2008 champion Park Tae Hwan was disqualified in the 400m Freestyle but later appealed, while world record holder Paul Biedermann failed to make it through.
Phelps and Cseh were alongside each other in the fourth heat but their apparent game of cat and mouse almost proved costly for both.
Phelps touched in 4:13.33, just 0.07 ahead of the Hungarian who won silver behind him three times in Beijing.
However, it was 17-year-old Kosuke Hagino who laid down the gauntlet with a time of 4:10.01 ahead of South Africa's Chad le Clos and Ryan Lochte, although the world champion was clearly easing off.
Phelps admitted to being taken by surprise and said: 'I didn't expect those guys to go that fast. I just wanted to try to get some good underwater, try to get some good times.
'I think the only thing that matters is really getting a spot in the final.'
Park's disqualification overshadowed Sun Yang's apparently effortless progress into the 400m Freestyle final in 3:45.07.
Elsewhere in the pool, Host Nation hope Hannah Miley booked a place in the final of the 400m women's Individual Medley in 4:34.98.