Sexual health severely decreases with age. For males older than 40 years, erectile dysfunction (ED) is the most common sexual disorder. Although physical and psychological risk factors for ED have been identified, protective factors are yet to be determined. To date, no study has examined endocrine and psychosocial factors in parallel with regard to their modifying effect on the age-related increase in ED. Two hundred and seventy-one self-reporting healthy men aged between 40 and 75 years provided both psychometric data on sexual function and a set of potential psychosocial protective factors, and saliva samples for the analysis of steroid hormones and proinflammatory cytokines. Around 35% of the participants reported at least a mild form of ED. Direct associations with ED were identified for perceived general health, emotional support, relationship quality, intimacy motivation but not for steroid hormones or proinflammatory markers. Moderation analyses for the association between age and ED revealed positive effects for testosterone (T), dehydroepiandrosterone (DHEA), perceived general health, emotional support, intimacy motivation, and a negative effect for interleukin-6 (all p < .05; f2 > .17). Group differences between older men with and without ED emerged for T, DHEA, and psychometric measures such as perceived general health, emotional support, satisfaction with life, and intimacy motivation (all p < .05; d > .3). Both psychosocial and endocrine parameters moderated the association between age and sexual health. Perceived general health, emotional support, intimacy motivation, and relationship quality emerged as psychosocial protective factors against ED. Higher T and DHEA and lower interleukin-6 levels also buffered against an age-related increase in ED.