Epalrestat, an aldose reductase inhibitor (ARI), was adopted to improve the function of peripheral nerves in diabetic patients. The aim of this study was to investigate whether epalrestat could restore the erectile function of diabetic erectile dysfunction using a rat model. From June 2016, 24 rats were given streptozocin (STZ) to induce the diabetic rat model, and epalrestat was administered to ten diabetic erectile dysfunction (DED) rats. Intracavernous pressure (ICP) and mean systemic arterial pressure (MAP), levels of aldose reductase (AR), nerve growth factor (NGF), neuronal nitric oxide synthase (nNOS), alpha-smooth muscle antigen (alpha-SMA), and von Willebrand factor (vWF) in the corpus cavernosum were analyzed. We discovered that epalrestat acted on cavernous tissue and partly restored erectile function. NGF and nNOS levels in the corpora were increased after treatment with epalrestat. We also found that the content of alpha-SMA-positive smooth muscle cells and vWF-positive endothelial cells in the corpora cavernosum were declined. Accordingly, epalrestat might improve erectile function by increasing the upregulation of NGF and nNOS to restore the function of the dorsal nerve of the penis.