The 29-year-old was banned by the Italian Olympic Committee Anti-Doping Agency in April after being found guilty of blood doping.
He had been admitted to hospital in February 2011 after transfusing his own blood, an act which doctors said nearly killed him.
Ricco appealed the ban, arguing the CONI tribunal was not impartial and the proceedings were flawed.
However CAS, sport's highest tribunal, rejected his case.
"The case was handled by a sole arbitrator, Professor Ulrich Haas (Germany), who considered that the arguments of the rider were unfounded and that, in particular, he had failed to demonstrate a lack of impartiality by the CONI Anti-Doping Tribunal," said CAS.
"Accordingly, the 12-year suspension was confirmed."
Ricco was kicked off the 2008 Tour de France while in second place after failing a test for the blood-booster CERA.
He served a 20-month ban from cycling and was also tried and fined €5,710 (£5,000) by a court in Padua, Italy.
- Addiction & Substance Abuse
- Politics & Government