"The player has been exonerated from any fault or negligence," the Court of Arbitration for Sport (CAS) said as it rejected an appeal from the International Tennis Federation (IFT) and World Anti-Doping Agency (WADA), who had asked for a one-to-two year ban.
"On a balance of probability, the CAS panel concluded that it was more likely than not that the player's contamination with cocaine resulted, as Gasquet always asserted, from kissing a woman in a nightclub in Miami on the day before the anti-doping test and that the player had met the required standards of proof with respect to the way of ingestion."
The world number 52, who appeared before a CAS hearing in Lausanne in November, was provisionally suspended in May after a sample he provided in March tested positive for benzoylecgonine, a metabolite of cocaine.
"I am totally relieved," Gasquet told French television channel Canal Plus.
"It was a crazy story and I went through a nightmare for eight months.
"I thought I had more chances to win grand slams, to beat (Rafael) Nadal at Roland-Garros and (Roger) Federer at Wimbledon than to be tested positive," he added.
"I am happy to be a hundred per cent cleared. It was very difficult for me, I'm glad it's over. I am now ready to go to Australia on December 28, to play two tournaments there and to enter the Australian Open.
"Mentally, it was very tough. I could have done without all this but now I'm happy to be back on the tennis courts. My goal is to make it back into the top 10," he added.
Gasquet, who finished 2007 in the top 10 of the ATP rankings, always claimed his innocence and said he had a hair sample tested by an independent lab which showed no trace of cocaine.
Belgian court overturns bans on Wickmayer, Malisse
ITF dismay at Schuettler decision
Davis Cup final on indoor court
WADA seeks Indian government stand on 'whereabout'
Somdev, Prakash advance in Seoul ATP Challenger