Jason Lezak held on to the lead Phelps gave him, anchoring the United States to a world record in the 400-meter medley relay against an Australian team that did its best to spoil history.
But Phelps, with a big hand from three teammates, would not be denied. He eclipsed Mark Spitz's seven-gold performance at the 1972 Munich Games, an iconic performance that was surpassed by a swimmer fitting of this generation: a 23-year-old from Baltimore who loves hip-hop music and texting with his buddies.
"I don't even know what to feel right now," Phelps said. "There's so much emotions going through my head and so much excitement. I kind of just want to see my mom."
Debbie Phelps was sitting in the stands at the Water Cube, tears streaming down her cheeks, her two daughters sitting with her.
Even though the Americans have never lost the medley relay at the Olympics, the latest gold was hardly a breeze. When Phelps dived into the water for the butterfly - the third of four legs - the Americans were third behind Japan and Australia.
But Phelps, swimming the same distance and stroke that he used to win his seventh gold a day earlier, powered back to the front on his return lap, passing off to Lezak with the Americans in front.
Australia's Eamon Sullivan tried to chase Lezak down and appeared to be gaining as they came to the wall. But Lezak touched in 3 minutes, 29.34 seconds - Phelps' seventh world record in his personal Great Haul of China.
The Aussies took silver in 3:30.04, also under the old world record, while Japan held on for the bronze.
"Nothing is impossible," Phelps said. "With so many people saying it couldn't be done, all it takes is an imagination, and that's something I learned and something that helped me."
Phelps patted breaststroker Brendan Hansen on the head and threw his arms in the air after Lezak finished, though the Americans still had to wait a couple of tantalizing minutes for the official results to be posted. Aaron Peirsol swam the leadoff leg for the Americans.
Finally, it flashed on the board.
Gold medal No. 8.
On deck, a beaming Phelps slapped hands with his teammates and thrust his arms toward the Water Cube roof. The winning swimmers locked arms as if they were in a football huddle about to break for a play.
Phelps, meanwhile, couldn't stop smiling.
"Without the help of my teammates this isn't possible," said Phelps, who won five individual races and three relays in Beijing.
"I was able to be a part of three relays and we were able to put up a solid team effort and we came together as one unit," he said. "For the three Olympics I've been a part of, this is by far the closest men's team that we've ever had. I didn't know everybody coming into this Olympics, but I feel going out I know every single person very well. The team that we had is the difference."