The utility model relates to a method of treating erectile dysfunction using herbal extract comprising the steps of extracting plant materials from a combination of Eurycoma longifolia, Moringa oleifera and Mimosa pudica, identifying bioactive compounds, assaying for lethality of the extract and testing for sexual effects. Extracted roots of Mimosa pudica, Eurycoma longifolia and young pods of Moringa oleifera were screened and tested for their active constituents in treating erectile dysfunction in mammals using laboratory mice. Phytochemical analysis shows the presence of several bioactive compounds from the combined extract of these plants. The common constituents found are flavonoids, alkaloids, amino acid, tannins, glycosides, saponins, tripenoid, glycoprotein, and polysaccharides. Individual plant extracts reported are glycosinolates, isothiocyanates, benzyl isothiocyanate niagimisin in M. pudica, zeain, quercetin, beta-sitosterol, caffeoylquinic acid and kempfero in M. oleifera, and eurycomanone, B-carbolin. eurycomanol, eurycomalactone, propionic acid and campesterol in E. longifolia.