Italy’s anti-doping agency NADO issued the verdict for the swimmer, who retired last December, and relay teammate Michele Santucci.
NADO originally sought an eight-year ban for the 2005 and 2007 100-metre freestyle world champion.
On Tuesday the 36-year-old was instead sentenced to a four-year ban.
An investigation into Magnini and Santucci was opened after the pair were linked to nutritionist Guido Porcellini, who was banned for 30 years for distributing doping products and counterfeit medicine.
Magnini’s name was found among the evidence, which revealed certain products to be destined for him.
However, investigators said there was no evidence that Magnini used or even received the products.
Magnini said he will appeal the ban, claiming he has never used illegal substances.
An outspoken critic of doping throughout his career, Magnini referred to the sentence as “ridiculous”.
“This sentence has had my name on it for a long time, that’s why I’m feeling such anger,” he declared.
“There’s no proof.”