Erectile dysfunction (ED), a complication of diabetes mellitus (DM), affects 50–75% of men with diabetes. Fibroblast growth factor 21 (FGF21) is a liver-derived metabolic regulator which plays a role in insulin-independent glucose uptake in adipocytes. We designed a clinical study and an animal experiment to investigate the relationship between FGF21 and DM-induced ED. The clinical study enrolled 93 participants aged > 18 years (61 patients with type 2 DM and 32 healthy controls) from Taian City Central Hospital (TCCH) in Shandong Province, China, amongst whom the association between serum FGF21 and diabetic ED was analyzed. To further validate this association, we developed animal model of diabetic ED using Sprague-Dawley (SD) rats. Serum FGF21 concentration and FGF21 mRNA expression in penile samples of the rats were determined with Western blotting and quantitative real-time PCR. Among the 93 participants, the level of serum FGF21 was negatively correlated with the IIEF-5 score (r = -0.74, P < 0.001). The analysis on the performance of FGF21 for ED diagnosis showed that the area under the receiver operating characteristic (ROC) curve was 0.875 (95% confidence interval [CI]: 0.803 to 0.946). In the animal experiment, the levels of serum FGF21, 2-Δ Δ Ct values of FGF21 mRNA expression, and relative levels of FGF21 in penile samples were higher in the ED group compared to the DM and control groups. Our findings demonstrated an association between the FGF21 level and diabetic ED, indicating the potential of this cytokine in predicting diabetic ED.