The present invention relates to a novel method for obtaining a pharmaceutical composition based on modafinil. This method consists of solubilizing S modafinil in a fluid in the supercritical state and then after expansion of said fluid, recovering S modafinil by causing it to be absorbed at the surface by a support appearing as granules. Said fluid may be CO2 or another solvent and the support, anhydrous lactose or mannitol. Application of the pharmaceutical composition in the cases when increased short term alertness and over a short period is required for the consumer of the pharmaceutical composition.