BackgroundThe global prevalence of erectile dysfunction among patients with diabetes is high. It is the most underestimated problem but has a great physical, psychological, and social impact on the individual with the disease, family, and society in general. Thus, this study aimed to assess the magnitude of erectile dysfunction and associated factors among patients with diabetes attending follow-up at a public hospital, Harar, Eastern Ethiopia.MethodsFacility-based cross-sectional study was conducted on selected 210 adult male patients with diabetes attending follow-up at a public hospital, Harar, Eastern Ethiopia, from 1 February to 30 March 2020. Simple random sampling was used to select study participants. A pre-tested interviewer-administered structured questionnaire was used to collect the data. The data were entered to EpiData version 3.1 and exported to SPSS version 20 for analysis. Bivariate and multivariable binary logistic regression were carried out, and a P-value of <0.05 was taken as statistically significant.ResultA total of 210 adult male patients with diabetes participated in the study. The overall magnitude of erectile dysfunction was 83.8%, with 26.7% suffering from mild, 37.5% mild to moderate, 29% moderate, and 6.8% severe erectile dysfunctions. Age 46–59 years [adjusted odds ratio (AOR): 2.560; 95% confidence interval (CI) (1.73, 6.53)], age ≥ 60 years [AOR: 2.9; 95% CI (1.48, 5.67)], and poor glycemic control [AOR: 2.140; 95% CI (1.9, 7.44)] were significantly associated with erectile dysfunction among patients with diabetes.ConclusionThe present study revealed a high magnitude of erectile dysfunction among population with diabetes. The age categories of 46–59 and ≥60 and having poor glycemic control were the only variables significantly associated with erectile dysfunction. Thus, routine screening and management for erectile dysfunction in patients with diabetes should be part of routine medical care particularly for adult male patients and those with poor glycemic control.