The present invention relates to a pharmaceutical composition for topical application for the treatment of alopecia, said composition comprising polymeric nanoparticles, preferably nanocapsules containing two active ingredients, finasteride and minoxidil, additives and a pharmaceutically acceptable carrier. The invention further includes a process for the preparation of polymeric nanoparticles, preferably nanocapsules of finasteride and minoxidil, a composition suitable for topical application for the treatment of alopecia, as well as the use of said nanocapsules for the preparation of a pharmaceutical composition.