Praveen Belchada from Arkana Kamblapadavu in Mudipu in the district was also ordered to pay a fine of Rs 25,000 failing which he would have to spend another year in jail.
The sentence was passed by the district and sessions judge M G Uma yesterday.
The chief district and sessions court is also the special court for trying cases under the Dangerous Drugs Act.
Belchada was arrested in 2012 from near Sadashiva temple at nearby Suratkal during a raid. He was found to be in possession of 130 gms of drugs. The seized substance was sent to forensic laboratory at Bengaluru, which confirmed that it was charas.