Japan's Takashi Yamamoto broke the Asian record to win the silver in 1:54.56 while Stephen Parry got the bronze in 1:55.52 to provide Britain with their first Olympic swimming medal since the Atlanta Games in 1996.
Phelps was a hot favourite to win the race and looked to be well in control after reaching the halfway stage almost half a second under world record and more than a body length ahead of the field.
But he began to tire at the turn for home and had to hold on for dear life as Yamamoto and Parry closed in, making it to the wall in the nick of time.
Phelps had made a perfect start to his quest for a record eight golds when he broke his own world record to win the 400 individual medley on the opening day of competition but little had gone right for him since.
He had to settle for bronze when the U.S. finished behind South Africa and the Netherlands in the 4x100 freestyle relay, an event that had lost only once before.
The 19-year-old finished with another bronze after an ultimately doomed attempt to take on Ian Thorpe and Pieter van den Hoogenband in the 200 freestyle.
The 200 butterfly, though, is Phelps's favourite event. He qualified for the event at the Sydney Olympics when he was just 15 and although he finished fifth, he soon made the event his.
Six months later Phelps broke the world record and in 2001 he won his first world title. He successfully defended his world crown in 2003, celebrating the achievement with a world record.
Phelps was due to swim the lead-off leg in the 4x200 freestyle relay on Tuesday. He is entered in the 100 butterfly and 200 individual medley later this week and may also swim the medley relay.
More from rediff