Erectile dysfunction is a prevalent urological problem affecting 3%-76.5% of men globally, yet its prevalence and associated factors in Zambia remain unknown. Therefore, this study aimed to investigate the prevalence of erectile dysfunction and associated factors among adults accessing services at Ndola Teaching Hospital from 2017 to 2022. This retrospective cross-sectional study involved 500 male patients from 2017 to 2022, both with and without erectile dysfunction. The study used Stata/SE version 17 for univariate and multiple logistic regression analyses, with a p-value of <0.05 indicating statistical significance. The prevalence of erectile dysfunction was found to be 34.7%. Formal employment (AOR 0.38; 95% CI: [0.15 – 0.94], p = 0.037), married (AOR 0.35; 95% CI: [0.13 – 0.95], p = 0.039), single (AOR 0.09; 95% CI: [0.02 – 0.35], p = 0.001), and widowed (AOR 0.03; 95% CI: [0.01 – 0.13], p < 0.001) were associated with a reduced risk of developing erectile dysfunction. Drinking alcohol (AOR 8.50; 95% CI: [3.98 – 18.16], p < 0.001), diabetes mellitus (AOR 34.3; 95% CI: [13.75 – 85.60], p < 0.001), hypertension (AOR 3.90; 95% CI: [1.77 – 8.59], p = 0.001), anti-depressants (AOR 17.2; 95% CI: [6.18 – 47.92], p < and Obesity (AOR 28.8; 95% CI: [2.42 – 343.99], p = 0.008) were associated with increased risk of developing erectile dysfunction. The study revealed that erectile dysfunction is a prevalent problem among men, with several risk factors identified, emphasizing the need to address these to prevent and effectively treat the condition.