The 31-year-old clocked 1:53.36 to beat Japan's Masato Sakai by just four hundredths of second at the Olympic Aquatics Stadium, Xinhua news agency reported.
Four years ago, Phelps mistimed his finish in the wind-milling stroke he does better than anyone, gliding to the wall a little too long after his final whirl of the arms. "I think something needs to be done", he said.
Gymnast McKayla Maroney inspired an internet meme after winning a silver medal at the 2012 London games.
Phelps also took aim at swimmers linked to doping, an issue that has been at the forefront on the heels Russian doping scandal. Oleksandr Pyatnytsya tested positive for the steroid turinabol and was retroactively disqualified from the London Games and ordered to return his medal, the International Olympic Committee said.
Ledecky is just getting started, a 19-year-old amateur headed to Stanford who won a surprise gold in 2012 and now actually seems like she could give Phelps's all-time medal records a run for their money.
"Coming to Rio, I didn't have any Olympic medals so I would have been OK grabbing any color of medal", said Hosszu.
Lochte swam the anchor leg of the 4x200-meter relay, helping the U.S.to a comfortable win in its preliminary heat.
This time, it was Phelps out front - barely - while Le Clos could only manage a fourth-place showing.
Ledecky strode atop the medal podium again with a bright smile after taking gold for winning the 200-meter freestyle.
Le Clos and Hungary's Laszlo Cseh, could win all the medals they wanted, but they counted about as much as a golf trophy in a tournament Tiger Woods wasn't playing in during the early 2000s.
Conor Dywer was leading off for the Americans, followed by Townley Haas and 11-time Olympic medalist Ryan Lochte, competing in his first event of these games.
Michael Phelps captured his 20th Olympic gold medal in dramatic fashion, sealing victory with a kiss from baby son Boomer, before adding a staggering 21st before the night was over.
At the other end of Olympic Park, the US women's gymnastics team captured a second straight gold with a high-flying and dominating performance.
For Britain, who had qualified first for the final, James Guy overhauled Takeshi Matsuda on the final leg to take the silver in 7:03.13, with Japan clocking 7:03.50.
Ledecky laughed as she thought back to the moment.
Russian Federation took the silver medal and China earned bronze. Maya DiRado of the United States held on for the bronze. "Dammit. I don't know".
Ledecky took the most challenging step toward a feat that's only been done one other time, holding off Sweden's Sarah Sjostrom to win the 200 freestyle and give the American star her second gold of the games. She said she almost threw up in the final 50, but gulped it back and finished in 1:53.73, comfortably ahead of Sarah Sjostrom who finished in 1:54.08.