Genetics and lifestyle independently determine dementia risk, but the interaction is unclear. We assessed the interactive relationship of apolipoprotein E (APOE) genotype and physical exercise on dementia risk over a 5-year period in 1,646 older adults from the Canadian Study of Health and Aging who were dementia-free at baseline. Physical exercise moderated the relationship between genotype and dementia (p < 0.01). Specifically, for APOE ɛ4 non-carriers, the odds of developing dementia were higher in non-exercisers than exercisers (OR = 1.98, 95% CI = 1.44, 2.71, p < 0.001), whereas, for APOE ɛ4 carriers, the odds of developing dementia were not significantly different between non-exercisers and exercisers (OR = 0.71, 95% CI = 0.46, 1.31, p = 0.34). Given that most individuals are not at genetic risk, physical exercise may be an effective strategy for preventing dementia.