After a disappointing start to the meet, Lochte looked more like himself Thursday night, pulling away to capture gold in the 200-meter individual medley.
Magnussen, who was viewed as a flop despite a silver medal at the London Olympics, rallied to win the 100 freestyle with a furious finishing kick, edging Americans Jimmy Feigen and Nathan Adrian.
But the Americans came through in the final event of the night.
No surprise there. Not with Franklin and Ledecky leading the U.S. team in the 4x200 free relay.
Ledecky put the Americans ahead at the start, and Franklin zipped away with a dominant anchor leg to win in 7 minutes, 45.14 seconds.
The 18-year-old Franklin is now 4 for 4 in Barcelona, with three events to go. Ledecky, only 16 and getting ready for her junior year of high school, is 3 for 3 with one race left.
No matter what, they will go down as two of the biggest stars of this meet.
Lochte barely celebrated after his race, letting out a deep breath as he squinted to see his winning time 1:54.98. Japan's Kosuke Hagino claimed the silver, more than a second behind, and Brazil's Thiago Pereira took bronze.
"The first two days I wasn't myself," Lochte said. "I was too worried about the outcome of each race, about finishing first, about my times, and that's not me. I am a swimmer who is really relaxed and goes out there to have fun."
Magnussen was certainly having fun after winning the sport's glamour event a victory he was denied last summer. The Australian swimmer known as "The Missile" hopped on the lane rope, flexing his muscles for the crowd while the fans from Down Under shouted "Oi! Oi! Oi!"
"It was really emotional," Magnussen said. "That last sort of 15 meters I really used the last 12 months of experiences that I've gone through, and I was really aggressive toward the wall at the end. I'm just stoked that I got there."
Russia's Vladimir Morozov, who does much of his training in Southern California, was the leader at the turn, just ahead of Adrian, the Olympic champion.
Magnussen was nearly a second off the pace, but he powered through the water on the return lap to win in 47.71. Feigen also relied on a strong finish to get the silver in 47.82, leaving Adrian to settle for the bronze at 47.84. Morozov faded to fifth.
At the Olympics, Magnussen was a big favorite in the 100 free, but Adrian edged him for the gold medal by a hundredth of a second the smallest margin possible in swimming. The Missile also failed to make the final of the 50 free, becoming one of the symbols of an underachieving Australian men's team that didn't win even one gold medal.
The Aussie men already have two in Barcelona: Magnussen and Christian Sprenger in the 100 breaststroke.
Magnussen was asked if beating Adrian was especially sweet after what happened in London.
"No," he said. "You know, if Adrian wasn't such a nice guy, it might be. You just can't hate him because he's so nice. I was just doing it for myself tonight."
The Americans were happy with their showing, especially Feigen. While Magnussen celebrated, a smiling Adrian put his arm around his teammate, who took the bulk of the blame for the U.S. settling for silver in the 4x100 freestyle relay. Despite a lack of international experience, Feigen was put on the anchor leg and couldn't hold on as France rallied for the victory.
Feigen was second again in the 100 free, but this time it felt more like a win.
"I started off a little shaky this whole worlds thing," he said. "I think it's coming together in the end."
Adrian knew it would be hard to hold off Magnussen.
"He's just an incredible competitor, and he's actually brought an entire new level to the 100 freestyle," Adrian said. "So it's a bummer, because without him we would be 1-2, but it's a good thing for the sport. It's exciting moving forward."
Lochte, who took a long break after London and cut back his training to work on a reality TV show, hardly looked in peak form while swimming the second leg of that 4x100 relay and laboring to a fourth-place finish in the 200 freestyle.
Then, he had a bit of an epiphany. Lochte said he had spent too much time worrying about results instead of just having fun. Sure, he wasn't in the best of condition, but he figured his racing skill would come through if he just relaxed a bit.
Well, he had every reason to scream "Jeah!" his nonsensical catchphrase after a dominating win in the 200 IM, a race he lost to Michael Phelps at last summer's Olympics.
Lochte trailed Pereira at the midway point, but he turned it on during the breaststroke leg and pulled away on the freestyle finish, gliding across the water to win by about a body length, 1.31 ahead of Hagino.
It was the 13th world championship gold of Lochte's career, his 21st medal overall.
He returned about 80 minutes later for the semifinals of the 200 backstroke. Lochte advanced to the final with the second-fastest time, trailing only teammate and reigning Olympic champion Tyler Clary.
In the relay, Ledecky led France's Camille Muffat at the first exchange, but the U.S. slipped back to second first behind the French, then Australia as Shannon Vreeland and Karlee Bispo took over for the middle legs.
But the U.S. was close enough when Franklin dove in for the final 200. She zipped by Australia's Alicia Coutts and won the gold easily. Australia settled for silver in 7:47.08, while France took the bronze in 7:48.43.
In the biggest surprise of the night, Denmark's Rikke Pedersen set a world record in the semifinals of the women's 200 breaststroke. She touched in 2:19.11, breaking the mark of 2:19.59 set by American Rebecca Soni at the London Games.
Soni is taking the year off but traveled to Barcelona for the championships.
China added to its medal haul with a pair of golds and a silver. Liu Zige won the women's 200 butterfly, edging the crowd favorite, Spain's Mireia Belmonte. Hungary's Katinka Hosszu took the bronze. Cammile Adams of the U.S. was seventh.
The Chinese went 1-2 in the 50 back, an event dropped by Franklin to focus on her other events. Zhao Jing won gold, with teammate Fu Yuanhui claiming the silver. The bronze went to Japan's Aya Terakawa. American Rachel Bootsma finished seventh.