Jatropha macrantha Müll Arg. L is also known as “huanarpo macho” and used in the Peruvian traditional medicine as an aphrodisiac and erectile dysfunction (ED). The aim of this study was to determine the phytochemical constituents in leaves and stems ethyl acetate fraction (LEAF and SEAF) of J. macrantha and to compare the antioxidant activity and the ameliorative effect on ketamine-induced erectile dysfunction in rats. The phytochemical constituents were determined by LC-ESI-MS/MS, the total phenolic compounds and total flavonoids (TPC and TF) by Folin-Ciocalteu and aluminum chloride, respectively. The antioxidant activity was determined by DPPH, ABTS, and FRAP assays. Experimental groups were divided as follows: I: negative control; II: positive control (ketamine at 50 mg/ kg/d); III: sildenafil 5 mg/kg; IV, V, VI: LEAF at 25, 50 and 100 mg/kg, respectively, and VII, VIII, IX: SEAF at 25, 50, and 100 mg/kg, respectively. The phytochemical analysis revealed the presence mainly of coumarins, flavonoids, phenolic acids, and terpenes. TPC of LEAF and SEAF were 359 ± 5.21 mg GAE/g and 306 ± 1.93 mg GAE/g, respectively; TF in LEAF and SEAF were 23.7 ± 0.80 mg EQ/g, and 101 ± 1.42 mg EQ/g, respectively. The DPPH, ABTS, FRAP in SEAF were 647 ± 3.27; 668 ± 2.30; and 575 ± 2.86 μmol TE/g, respectively, whilst LEAF showed 796 ± 3.15; 679 ± 0.85; and 806 ± 3.42 μmol TE/g, respectively. Regarding sexual behavior, LEAF showed a better effect in mount frequency, intromission frequency, ejaculation frequency, mount latency, intromission latency, ejaculatory latency, and post ejaculatory latency than SEAF. As conclusion, LEAF of J. macrantha at 50 mg/kg showed a better effect on sexual behavior in male rats with erectile dysfunction than SEAF but not higher than sildenafil.