In a similar manner to erectile dysfunction (ED), osteocalcin (OC) is also said to be associated with cardiovascular disease (CVD); however, the effect of OC in ED is unclear. This study was conducted based on the Fangchenggang Area Male Health and Examination Survey (FAMHES) project that ran between September and December 2009. ED was evaluated using the International Index of Erectile Function (IIEF-5). OC was shown to be associated with mild (unadjusted: OR = 0.647; P = 0.016) or moderate (unadjusted: OR = 0.453; P = 0.007) ED. Meanwhile, higher OC levels were more prominently associated with ED (unadjusted: OR = 0.702; P = 0.014). When subdividing the groups by age, the correlation between OC and ED presented in those aged 40-49 years, even in the multi-adjusted model, for those with moderate (OR = 0.255, P = 0.044) and severe (OR = 0.065, P = 0.005) ED. The relationship between OC and ED was also associated with a high level of testosterone, non-obesity, drinking, and non-metabolic syndrome. In summary, OC may play a protective role in middle-aged (40-49 years) men with moderate-severe ED, especially those with a high level of testosterone, non-obesity, drinking, and non-metabolic syndrome.