We previously showed that castration of rats reduced erectile function over time; when testosterone replacement therapy was started 4 weeks after castration, erectile function improved. In this study, we examined the mechanism of improvement in erectile function following testosterone replacement therapy in rats. Thirty 12-week-old rats were divided into castrated (Cast), castrated with subcutaneous administration of testosterone (Cast + T), and sham (Sham) groups. Erectile function and mRNA and protein expression were evaluated in the rats by using standard methods. To assess erectile function, we measured the intracavernosal pressure, mean arterial pressure, mRNA expression of endothelial growth factors, and protein expression of endothelial nitric oxide synthase (eNOS). The intracavernosal pressure/mean arterial pressure ratio was significantly lower in the Cast group, and testosterone administration significantly improved (P = 0.017). Compared to the Cast group, the Cast+T group exhibited significantly increased mRNA expressions of vascular endothelial growth factor A (VEGF-A), intercellular adhesion molecule 1 (ICAM-1), transforming growth factor-β (TGF-β), nerve growth factor (NGF), α-smooth muscle actin (α-SMA), caveolae associated protein 1 (Cavin-1), Cavin-2, Cavin-3, sirtuin 1 (Sirt-1), sphingosine-1-phosphate 1 (S1P1), S1P2, and S1P3 and eNOS protein expression. Testosterone replacement therapy improved erectile function in castrated rats by increasing growth factors and eNOS protein.