Former Chelsea and Barcelona player Deco has been cleared of doping because of errors by the laboratory in Rio which carried out the tests.
The 36-year-old had been banned for a year after being accused of testing positive for traces of a diuretic that can be used to mask other substances.
The laboratory has been suspended from involvement in the World Cup, forcing Fifa to fly samples to Lausanne.
Deco, who has since retired, appealed to the Court of Arbitration for Sport.
His samples were retested in Lausanne, Switzerland, with Fifa informing the CAS that "no prohibited substance(s) or metabolite(s) or marker(s) of a prohibited method(s) on the test menu were detected".
The Rio laboratory was also suspended by the World Anti-Doping Agency in August.
Deco, who also played for Porto and Barcelona, spent two years at Stamford Bridge from 2008 to 2010, making more than 50 appearances.
He won the Premier League title in his second season, as well as two FA Cups in 2009 and 2010 and is one of only a handful of players to win the Champions League with two clubs.