Chronic inflammation may cause endothelial dysfunction and atherosclerosis, resulting in subsequent erectile dysfunction (ED). We examined the relationship between chronic osteomyelitis, which is a chronic inflammatory disease, and ED. A retrospective cohort study was conducted using data from the National Health Insurance Research Database. After excluding patients < 40 years of age, 677 male patients newly diagnosed with chronic osteomyelitis (COM) from 1 January 2000 to 31 December 2011 were identified for the study. The non-osteomyelitis comparison cohort consisted of 2706 male participants. The incidence of ED was 2.66-fold higher in the COM cohort than in the non-osteomyelitis cohort (4.01 vs 1.51 per 10 000 person-years). After adjusting for age and comorbidities of coronary heart disease, hypertension, hyperlipidemia, depression, stroke, diabetes, peripheral vascular disease, chronic kidney disease, chronic obstructive pulmonary disease and asthma, the patients with COM had a 2.82-fold risk of ED (95% confidence interval = 1.44-5.56). The incidence of ED increased with that of comorbidities in both cohorts. The highest hazard ratio was in patients between 40 and 59 years of age who had COM. Our data showed, for the first time, that COM is a possible risk factor for the development of ED.