A heroin trafficker has laughed and hugged his lawyer as he was freed by the ACT Supreme Court, after a judge found he had already served his time while awaiting trial.

Chang Kee Song, 43, pleaded guilty to trafficking heroin, but fought a second charge of money laundering brought after hundreds of thousands of dollars in cash was found at his home.

During a colourful trial on the second charge, Song spent much of his evidence teaching Justice David Mossop how to count cards - arguing he had not laundered money and instead won the money in interstate casinos.

"I like to play Blackjack," he said, telling the court he and a group of friends had learnt the technique when they were younger.

Today, Justice Mossop acquitted him of the money laundering charge, and sentenced Song to 12 months in jail for heroin trafficking.

When he pleaded guilty to heroin trafficking, Song said he had suffered a severe addiction, and bought a large amount of heroin with friends so they could obtain it at a cheaper rate.

He also told the court the syndicate wanted to avoid contact with street drug dealers.

Justice Mossop noted at the time of his arrest Song had been consuming two to three grams of the drug a day, although he was now on methadone.

"Apart from his heroin use he appears to have been a functioning member of society holding down employment," he said.

He also listed a long criminal history, which he said reflected Song's drug addiction.

Because Song had spent time in jail awaiting his trial, Justice Mossop declared he had served his time and allowed him to walk free.