One of the leading global causes of death and disability is diabetes mellitus (DM). It’s been linked to low libido and erectile dysfunction (ED), contributing to a miserable existence. This analysis aimed to identify risk factors for ED in diabetic males. Over the course of 1.5 years, 357 males with diabetes were enrolled in a hospital-based cross-sectional observational study. Multiple logistic regression analysis was used to identify independent predictors of ED using the International Index of Erectile Function score. Among diabetic males, ED was detected in 212 (50.38%) of the sample. There was a moderate negative link between potency score and duration of diabetes (r=-0.324), systolic blood pressure (SBP), and diastolic blood pressure (r=-0.647), and a substantial negative correlation between potency score and age (r=-0.647). There was a weak inverse relationship between the potency score and body mass index, fasting blood sugar, serum cholesterol, and serum creatinine. Serum testosterone levels were positively correlated with arousal levels. Independent predictors of ED included age, SBP, diabetes duration, fasting blood sugar, and serum-free testosterone (all P<0.05). Diabetic men have a disproportionately high rate of ED. Quality of life and sexual function in men with diabetes could benefit from better blood sugar and blood pressure management.