The actor had on Monday filed for immunity from prosecution before a special Narcotic Drugs and Psychotropic Substances (NDPS) court.
The actor was granted immunity in the case on the condition that he undergoes a detoxification process. Fardeen had appealed for leniency after completing a de-addiction programme at KEM Hospital recently.
The court, however, held that if the actor was arrested once again for a similar offence in the future the immunity would be withdrawn.
Fardeen had in October last year been held guilty of attempting to buy cocaine in a case dating to 2001, but dropped charges of possessing over two grams of the drug were dropped.
The Narcotics Control Bureau (NCB) had arrested Khan in Juhu in northwest Mumbai May 5, 2001 on charges of possessing cocaine. Nasir Shaikh who allegedly sold him the drug and Tony Gomes who allegedly supplied it to Shaikh were also arrested.
Charged under the Narcotic Drugs and Psychotropic Substances Act, Khan had, however, claimed that he had attempted to buy only one gram of cocaine as against NCB claim that nine grams of cocaine was found on him and Shaikh.
According to the NDPS Act, less than two gm is considered a small quantity. Under the act, an accused can, at the maximum, face a six-month jail term for possession of a small quantity of drugs.