The present invention relates to a novel process for obtaining a modafinil-based pharmaceutical composition. This process consists in solubilizing S-modafinil in a fluid in the supercritical state, and then, after reducing the pressure of said fluid, in recovering said S-modafinil by absorbing it at the surface of a substrate which is in the form of granules. Said fluid may be CO2 or another solvent and the substrate may be anhydrous lactose or mannitol. Use of the pharmaceutical composition in cases where increased vigilance in the short term and over a brief period of time is required in the person taking said pharmaceutical composition.La presente invención se refiere a un nuevo procedimiento de obtención de una composición farmacéutica a base de modafinilo. Este procedimiento consiste en disolver el S modafinilo en un fluido en estado supercrítico y, tras el reposo de dicho fluido, recuperar el S modafinilo haciéndolo absorber en superficie mediante un soporte que se presenta en forma de gránulos. Dicho fluido puede ser el CO2 u otro disolvente y el soporte, lactosa anhidra o manitol. Aplicación de la composición farmacéutica en el caso de que el consumidor requiera mayor vigilia a corto plazo y en un breve periodo.