Objectives: To determine whether cancer confers protection against Alzheimer's disease and to evaluate the relationship in the context of smoking-related cancers versus non-smoking related cancers. Design: Mendelian randomization analysis using cancer-associated genetic variants as instrumental variables. Setting: International Genomics of Alzheimer's Project. Participants: 17,008 Alzheimer's disease cases and 37,154 controls. Main outcome measures: Odds ratio of Alzheimer's disease per 1-unit higher log odds of genetically predicted cancer. Results: We found that genetically predicted lung cancer (OR 0.91, 95% CI 0.84-0.99, p=0.019), leukemia (OR 0.98, 95% CI 0.96-0.995, p=0.012), and breast cancer (OR 0.94, 95% CI 0.89-0.99, p=0.028) were associated with 9.0%, 2.4%, and 5.9% lower odds of Alzheimer's disease, respectively, per 1-unit higher log odds of cancer. When genetic predictors of all cancers were pooled, cancer was associated with 2.5% lower odds of Alzheime's disease (OR 0.98, 95% CI 0.96-0.988, p=0.00027) per 1-unit higher log odds of cancer. Finally, genetically predicted smoking-related cancers showed a more robust inverse association with Alzheimer's disease than non-smoking related cancers (5.2% lower odds, OR 0.95, 95% CI 0.92-0.98, p=0.0026, vs. 1.9% lower odds, OR 0.98, 95% CI 0.97-0.995, p=0.0091). Conclusions: Genetically predicted lung cancer, leukemia, breast cancer, and all cancers in aggregate are associated with lower odds of incident Alzheimer's disease. Furthermore, the risk of Alzheimer's disease was lower in smoking-related versus non-smoking related cancers. These results add to the substantial epidemiological evidence of an inverse association between history of cancer and lower odds of Alzheimer's disease, by suggesting a causal basis for this relationship.