Migraine is common among people with multiple sclerosis (MS), but the reasons for this are unknown. We tested 3 hypothesized mechanisms for this observed comorbidity, including migraine is a risk factor of MS, genetic variants are shared between the conditions, and migraine is because of MS. Data were from 2 sources: publicly available summary statistics from genome-wide association studies of MS (N = 115,748) and migraine (N = 375,752 and N = 361,141) and a case-control study of MS recruited from the Kaiser Permanente Northern California Health Plan (N = 1,991). For the latter participants, migraine status was ascertained using a validated electronic health record migraine probability algorithm or self-report. Using the public summary statistics, we used 2-sample Mendelian randomization to test whether a migraine genetic instrumental variable was associated with MS. We used linkage disequilibrium score regression and LOGODetect to ascertain whether MS and migraine shared genetic variants across the genome and regionally. Using the Northern California MS cohort, we used logistic regression to identify whether people with both MS and migraine had different odds of clinical characteristics (e.g., age at MS onset, Perceived Deficits Questionnaire, and depression) or MS-specific risk factors (e.g., body mass index, smoking status, and infectious mononucleosis status) compared with people with MS without migraine. We did not find evidence supporting migraine as a causal risk factor of MS (p = 0.29). We did, however, identify 4 major histocompatibility complex (MHC) loci shared between MS and migraine. Among the Northern California MS cohort, 774 (39%) experienced migraine. People with both MS and migraine from this cohort were more likely to ever smoke (odds ratio [OR] = 1.30, 95% CI: 1.08-1.57), have worse self-reported cognitive deficits (OR = 1.04, 95% CI: 1.02-1.06), and ever experience depression (OR = 1.48, 95% CI: 1.22-1.80). Our findings do not support migraine as a causal risk factor of MS. Several genetic variants, particularly in the MHC, may account for some of the overlap. It seems likely that migraine within the context of MS is because of MS. Identifying what increases the risk of migraine within MS might lead to an improved treatment and quality of life.