Procedure for obtaining a pharmaceutical composition characterized in that it consists in dissolving the modafinil S in a fluid in a supercritical state, then, after the expansion of said fluid, in recovering said modafinil S causing it to be absorbed on the surface by an inert support that is Presents in the form of granules.Procedimiento para la obtención de una composición farmacéutica caracterizado porque consiste en disolver el S modafinil en un fluido en estado supercrítico, luego, después de la expansión de dicho fluido, en recuperar dicho S modafinil haciendo que se absorba en superficie por un soporte inerte que se presenta en forma de gránulos.