The present invention relates to the use of modafinil in cocaine addiction. The modafinil used is the dextrorotatory enantiomer thereof (modafinil S), having a very rapid release time of less than 1 hour, preferably 15-30 minutes, and very reduced wakefulness-promoting effects of less than 4 hours, preferably less than 2 hours. Said modafinil is to be taken in the form of a pharmaceutical composition via oral administration, each unit dose comprising 25-200 mg, preferably 50-100 mg, of modafinil S. The invention further relates to the use of said pharmaceutical composition as a substitution treatment for cocaine addicts.