Defending Olympic champion France was out front when Phelps dove into the water on the second leg, taking over for leadoff swimmer Caeleb Dressel.
Even though the 100 free isn't one of Phelps' specialties - he's never swam it individually at the Olympics, only in the relays - he blazed down and back in a stunning 47.12 seconds, a time that was faster than all but the three anchors on the medal-winning teams, three of the best in the world at that distance.
"Coming off the wall I thought my kickout was great," Phelps said. "I just wanted to hammer it, hit the touch and give them a bigger lead."
That he did. Ryan Held kept the Americans in front before giving way to Nathan Adrian, the nation's best sprinter.
At that point, it wasn't really in doubt.
But Phelps wasn't taking any chances, pounding the starting block and shouting toward Adrian as the anchor made the turn for home.
When Adrian touched the wall first in 3 minutes, 9.92 seconds, Phelps thrust his right arm in the air and looked toward his infant son Boomer, nuzzling in the arms of his mother Nicole Johnson, the roaring crowd blocked out by noise-canceling headphones.
Little Boomer won't remember what his daddy did this night.But that gold medal will never let him forget.
It was quite a night for the Americans, who were shut out on the golds on the opening night of swimming.
Racing nothing but the clock, Katie Ledecky gave the U.S. its first victory by crushing her own world record in the 400 freestyle.
The result was totally expected.
The unassuming teenager from suburban Washington has dominated the longer freestyle events since winning gold in the 800 free at the London Olympics as a 15-year-old.
The only drama was whether she'd take the world record even lower.Her powerful stroke quickly made that a moot point, too.
Ledecky kicked off the first wall with a lead of nearly a body length and steadily pulled away from the overmatched field - as well as the world-record line superimposed on the video screen.
Her arms churning effortlessly through the water, Ledecky touched nearly 5 seconds ahead of her closest pursuer and quickly whipped around to look at the scoreboard.
When Ledecky saw the time - 3:56.46 - she let out an uncharacteristic scream and shook her right fist.
She crushed the mark of 3:58.37 that she set nearly two years ago on the Gold Coast of Australia, and had been chasing ever since."I was pumped," Ledecky said.
"That's what I wanted and I had been so close to breaking that all year, the past two years. I knew I was due for a breakthrough."
She's just getting warmed up.Ledecky, who added gold to the silver she won in the women's 4x100 free relay, is also favored in other two individual events: the 200 and 800 free.
She could pick up another gold in the 4x200 free relay.
It was a night of world records in Rio.Britain's Adam Peaty set his second mark in as many nights in the 100 breaststroke, while Sarah Sjostrom of Sweden eclipsed her own mark in the 100 butterfly.
In all, six world records have fallen on the first two days of swimming.
Speaking of records, Phelps will likely take his medal count to heights that may never be reached by the time he's done in Rio.
He's still got three individual events, and will surely swim two more relays.
Given the form he showed in his Rio debut, five more golds are certainly within reach.As it stands, he's got 23 medals overall.
"That's the fastest 100 free I've ever gone in my career, so I hope that's a good sign," Phelps said.
"I guess we'll see over the next couple of days. But I'm very pleased with the start."
For Phelps, it was the fastest relay time he's ever produced at the Olympics. Faster even than 2008, when his Great Haul of China - a record eight gold medals that broke Mark Spitz's longstanding record - included a time of 47.51 in the 4x100 free relay.
At age 31, the guy can still amaze.
France took the silver in 3:10.53, while Australia claimed the bronze in 3:11.37, holding off a Russian team that was booed during the introductions - a reminder of the drug scandal that has rocked the nation.
Vladimir Morozov, initially banned from the Olympics, was one of Russia's relay swimmers.
Those ill feelings were pushed aside by the sight of Phelps once more climbing to the top step of the medal podium.Afterward, taking that familiar victory lap around the pool - a route he knows oh-so-well - a single tear ran down his cheek.
He was no doubt remembering the ups and downs of the last four years. A second drunken-driving arrest. Six weeks of therapy. Giving up alcohol.
Getting engaged to Johnson. Reconnecting with his estranged father. Becoming a father himself for the first time.
Phelps retired four years ago, insisting he was done with swimming, only to return for what he calls his real farewell, the one that will send him out the way he really wants to go.
"It felt good to get my last 400 free relay of my career with this thing around my neck," he said. "It feels good to get it back."
Now, to make more room in the case.