Guillermo Canas has had his two-year ban for failing a drugs test reduced to 15 months after an appeal to the Court of Arbitration for Sport (CAS).
Canas always insisted he did not knowingly take the drug
The Argentine, 28, will now be able to return to competition on 10 September.
The CAS agreed Canas had not knowingly taken a banned diuretic when he was given medicine by staff at the Mexican Open in February 2005.
Although the court noted he failed to check the product, it found his negligence was "not significant".
Canas was suspended in August last year after lodging an appeal with an independent Tennis Anti-Doping Program tribunal.
Though the CAS decided to shorten his ban it rejected his request for it to be overturned.
The panel said: "A mistake in the medication was made not by the player, but rather by the tournament staff.
"Canas took the medication he received without reviewing the content of the box, even though he knew it had been through several hands before being delivered to him.
"The player had a duty of utmost caution."
The CAS also overturned the ATP's decision to invalidate Canas's results for the eight tournaments he played after the Acapulco event.
At the time of his ban, the Argentine was ranked 10th in the world and had won six ATP Tour career titles.