Background Endogenous sex hormones have been related to cardiovascular outcomes and mortality. We hypothesized that sex hormones are related to atrial fibrillation (AF) in a community-based cohort of middle-aged to older men. Methods and Results We examined testosterone, estradiol, and dehydroepiandrosterone sulfate in relation to incident AF in men participating in the Framingham Heart Study. We assessed the 10-year risk of AF in multivariable-adjusted hazard models. The cohort consisted of 1251 men (age, 68.08.2 years), of whom 275 developed incident AF. We identified a significant interaction between age and testosterone and, therefore, stratified men into age 55 to 69 years (n=786), 70 to 79 years (n=351), and 80 years (n=114). In men aged 55 to 69 years, each 1 SD decrease in testosterone was associated with hazard ratio (HR) 1.30 (95% confidence interval [CI], 1.07-1.59) for incident AF. The association between testosterone and 10-year incident AF in men 70 to 79 years did not reach statistical significance. In men 80 years, a 1 SD decrease in testosterone was associated with HR 3.53 (95% CI, 1.96-6.37) for AF risk. Estradiol was associated with incident AF (HR, 1.12; 95% CI, 1.01-1.26). Dehydroepiandrosterone sulfate had a borderline association with risk of AF that was not statistically significant (HR, 1.12; 95% CI, 0.99-1.28). Conclusions Testosterone and estradiol are associated with incident AF in a cohort of older men. Testosterone deficiency in men 80 years is strongly associated with AF risk. The clinical and electrophysiological mechanisms underlying the associations between sex hormones and AF in older men merit continued investigation.