OBJECTIVE: To determine whether serum magnesium and calcium concentrations are causally associated with ischemic stroke or any of its subtypes using the mendelian randomization approach. METHODS: Analyses were conducted using summary statistics data for 13 single-nucleotide polymorphisms robustly associated with serum magnesium (n = 6) or serum calcium (n = 7) concentrations. The corresponding data for ischemic stroke were obtained from the MEGASTROKE consortium (34,217 cases and 404,630 noncases). RESULTS: In standard mendelian randomization analysis, the odds ratios for each 0.1 mmol/L (about 1 SD) increase in genetically predicted serum magnesium concentrations were 0.78 (95% confidence interval [CI] 0.69-0.89; p = 1.3 × 10-4) for all ischemic stroke, 0.63 (95% CI 0.50-0.80; p = 1.6 × 10-4) for cardioembolic stroke, and 0.60 (95% CI 0.44-0.82; p = 0.001) for large artery stroke; there was no association with small vessel stroke (odds ratio 0.90, 95% CI 0.67-1.20; p = 0.46). Only the association with cardioembolic stroke was robust in sensitivity analyses. There was no association of genetically predicted serum calcium concentrations with all ischemic stroke (per 0.5 mg/dL [about 1 SD] increase in serum calcium: odds ratio 1.03, 95% CI 0.88-1.21) or with any subtype. CONCLUSIONS: This study found that genetically higher serum magnesium concentrations are associated with a reduced risk of cardioembolic stroke but found no significant association of genetically higher serum calcium concentrations with any ischemic stroke subtype