The present invention relates to the application of modafinil in cocaine addiction. The modafinil used is its dextro-rotatory enantiomer (S modafinil), having a release time of less than 1 hour and wakening effect of less than 4 hours. It is absorbed orally as a pharmaceutical composition, each unit dose including from 25 to 200 mg of S modafinil. The pharmaceutical composition can be used as a substitute treatment for cocaine addicts.