A tearful Cesar Cielo powered his way to gold in the 50m butterfly at the World Championships, a week after the Brazilian was cleared to compete having tested positive for doping in May.
The 24-year-old broke down in tears after winning the final in Shanghai and later at the medal ceremony.
Alexander Dale Oen paid tribute to the victims of the tragedy in Norway after he won the 100m breaststroke final.
"I was racing more with my heart today than I was technically," he said.
Dale Oen finished in a time of 58.71 seconds, comfortably ahead of silver medallist Fabio Scozzoli of Italy, who touched in 59.42, while South African Cameron Van Der Burgh was third in 59.49.
"I just tried to use what happened back home as fuel and to think that we just need to push forward," added Dale Oen.
"We really need just to let everyday life come back. We can't let this guy ruin the future for us," he said, referring to Anders Behring Breivik, who has confessed to the attacks in Norway.
Earlier, Olympic 50m freestyle champion Cielo won the 50m fly title in 23.10 seconds ahead of Australians Matthew Targett (23.28) and Geoff Huegill (23.35).
The Brazilian and three team-mates were warned, rather than banned, by their national governing body when they tested positive for banned substance furosemide at a meet in Rio in May.
Fina, swimming's world governing body, appealed against the decision, but the Court of Arbitration for Sport (Cas) dismissed the appeal at a hearing in Shanghai on Thursday.
Cielo, who faced a ban of two years had Fina's appeal been successful, said he consumed the drug in a contaminated batch of a food supplement he regularly used.
"I didn't expect the gold medal at all," the Brazilian said. "That's the biggest relief in my life.
"It is the time to test not only my ability to swim but also how much I can take. I'm really proud I can compete with the best swimmers in the world."
Elsewhere, 15-year-old Ye Shiwen caused a sensation when the Chinese teenager beat more experienced opposition to the 200m individual medley title.
Ye produced an outstanding final 50m on the freestyle leg of the race to win in a time of 2:08.90, ahead of Australia's Alicia Coutts (2:09.00) and former world champion Ariana Kukors (2:09.12).
In the first final of the day, Dana Vollmer of the United States won the women's 100m fly in 56.87. Coutts took silver (56.94 ) while China's Lu Ying was third (57.06).
Multiple-Olympic gold medallist Michael Phelps qualified fifth fastest for the final of the men's 200m freestyle.
The American star finished third (1:46.91) in his semi behind defending world champion Paul Biedermann (1:45.93) and United States team-mate Ryan Lochte (1:45.93).
France's Yannick Agnel was the fastest qualifier after winning the other semi-final in 1:45.62.
"It's a deadly field," said Phelps as he contemplated Tuesday's final. "You know it's going to be down to the last 50. I think whoever gets their feet over first in that 150 (turn) is going to have that shot."