Erectile dysfunction (ED) is a major complication of diabetes mellitus. Icariin has been shown to enhance erectile function through its bioactive form, icarisid II. This study investigates the effects of icarisid II on diabetic rats with ED and its potential mechanism via the assessment of advanced glycosylation end products (AGEs), autophagy, mTOR and the NO-cGMP pathway. Icarisid II was extracted from icariin by an enzymatic method. In the control and diabetic ED groups, rats were administered normal saline; in the icarisid II group, rats were administered icarisid II intragastrically. Erectile function was evaluated by measuring intracavernosal pressure/mean arterial pressure (ICP/MAP). AGE concentrations, nitric oxide synthase (NOS) activity and cGMP concentration were assessed by enzyme immunoassay. Cell proliferation was analysed using methyl thiazolyl tetrazolium assay and flow cytometry. Autophagosomes were observed by transmission electron microscopy, monodansylcadaverine staining and GFP-LC3 localisation. The expression of NOS isoforms and key proteins in autophagy were examined by western blot. Our results have shown that Icarisid II increased ICP/MAP values, the smooth muscle cell (SMC) growth curve, S phase and SMC/collagen fibril (SMC/CF) proportions and decreased Beclin 1 (P,0.05). Icarisid II significantly increased the proliferative index and p-p70S6K(Thr389) levels and decreased the numbers of autophagosomes and the levels of LC3-II (P,0.01). Icarisid II decreased AGE concentrations and increased cGMP concentration, NOS activity (P,0.05) and cNOS levels (P,0.01) in the diabetic ED group. Therefore, Icarisid II constitutes a promising compound for diabetic ED and might be involved in the upregulation of SMC proliferation and the NO-cGMP pathway and the downregulation of AGEs, autophagy and the mTOR pathway.