The boy from Baltimore, who had set out to redefine the boundaries of his sport, had succeeded beyond anybody's expectations with twice as many Olympic titles as any other athlete in the modern Games.
At the age of 27 he will move on, secure in the knowledge that he could not have done any more in the sport that became his life.
"I told myself that I never wanted to swim when I was 30," he said. "I've been able to do everything I wanted, I've been able to achieve the goals I wanted to achieve and I've managed to do every single thing. It's time for other things."
Phelps, the most accomplished all-round male swimmer ever, set his sights high from the start.
"Nothing is impossible," he wrote in his autobiography 'No Limits' published after his record eight gold medals at the 2008 Beijing Games.
"You can't put a limit on anything. The more you dream, the farther you get. When I'm focused, there is not one single thing, person, anything that can stand in the way of my doing something."
The magnitude of his achievement as he quit the pool and entered the history books can be measured by the list of the other Olympic multiple medallists.
Phelps collected 22 medals after starting Olympic life as a 15-year-old at the 2000 Sydney Olympics.
A distinguished quartet comprising track and field athletes Carl Lewis and Paavo Nurmi, gymnast Larisa Latynina and swimmer Mark Spitz won nine gold medals. Latynina, now 77, was in London to witness Phelps overtake her previous overall total of 18.
After his final race, Phelps accepted a silver trophy from world governing body FINA which described him as the greatest Olympian of all time. It is an accolade Phelps has never bestowed on himself and he was not about to start on Saturday.
"I have been able to become the best swimmer of all time," he said. "I said (to coach Bob Bowman) we have been able to get here together and I thanked him."
Phelps has trained under Bowman since he was 11 and there was plenty of emotion on both sides on Saturday.
"My first memory of him running around the pool when kids were playing dressed in his own tiny speedos, playing games in the pool," Bowman said.
"Now he has a real perspective, back then the only perspective was performance. And it was really focusing on every detail we could.
"But he was only focused on that, he didn't have an appreciation for the bigger picture."
Phelps' final Olympic campaign after he dropped the 200 freestyle from his Beijing programme and aimed for seven gold medals in London started badly last Saturday when he finished fourth in the 400 metres individual medley behind compatriot Ryan Lochte.
Lochte was immediately, and prematurely, hailed as the new face of American swimming but he began to fade while Phelps started to flourish.
Beaten to the touch in the 200 metres butterfly, his signature event, Phelps retained the 100 butterfly by sheer force of will after he was seventh at the turn.
A day earlier he had won the 200 individual medley title to become the first man to win three Olympic gold medals in a row.
"The first race (400 IM) took the pressure off," Bowman said. "We said 'we might as well enjoy it because it doesn't look as if it's going to go too well.
"We should have least have run while we are here. But I do think that allowed us to relax a little bit and he started to swim well in the relays and kind of picked it up again."
Tributes have been pouring in all week from other members of the American swimming team, including one from 17-year-old Missy Franklin, another multi-eventer who will take over the torch from Phelps for the 2016 Rio de Janeiro Games.
"What he has done is incredible," Franklin said. "And he's kind of made people rethink the impossible - rethink what they can do and how they can push themselves."
Asked to assess Phelps' career, Bowman said: "It's not only the number of medals, it's the quality. Eighteen out of 22 gold medals? Two silver, two bronze? World records, you can look at all that.
"I just think the quality of it is so great, nobody can match that."
The aftermath for Phelps will start with travelling, some publicity appearances and plenty of rest and relaxation.
Golf with his friend, U.S. Masters champion Bubba Watson is also on the agenda as Phelps confirmed during the week when he said he would not be rescinding his decision to retire.
"Bubba said I'm a good swimmer but still terrible at golf.
So maybe I'll challenge him to swimming and we can go on a golf course after that, that will be (all) my competitive swimming after I'm done," he said.