Diabetes mellitus (DM) is the most common cause of erectile dysfunction (ED). Up to 28% of men complaining of ED have DM as the primary causative factor. DM should be considered in all patients presenting with ED. Known diabetic men should be encouraged to have excellent control of their DM to avoid not only the chronic complications of DM but also its acute effects, especially the effect of hyperglycemia on erectile function. The physiological impact of diabetes on sexual function in men is reviewed.