IntroductionMigraine is a prevalent neurological disorder characterized by recurrent attacks, leading to a substantial global disease burden. Recent observational studies have reported the onset and worsening of migraine following COVID-19 infection and vaccination. However, traditional observational study designs have limitations in controlling for confounding factors, potentially resulting in biased and inconsistent conclusions. To address this, we applied Mendelian randomization (MR) to investigate the causal relationship between COVID-19 infection and vaccination with migraine.MethodsThis study utilized summary-level genome-wide association study (GWAS) data from the GWAS catalog and FinnGen database to evaluate the effects of varying degrees of COVID-19 infection and vaccination on migraine. We employed inverse variance weighted (IVW) fixed-effect and random-effect models as the primary methods for MR analysis, with MR-Egger and other approaches as complementary methods. Sensitivity analyses, including Cochran's Q test, MR-Egger intercept regression, and MR-PRESSO, were conducted to ensure robustness of the results.ResultsOur MR analysis revealed no significant causal association between COVID-19 infection and migraine. However, a significant causal association was found between COVID-19 vaccination and migraine (beta = 0.071, P = 0.034). The results were confirmed through a series of sensitivity tests, demonstrating the robustness of the findings.DiscussionThis study provides novel evidence of a significant causal link between COVID-19 vaccination and migraine, while no such association was observed with COVID-19 infection. These findings may have important implications for clinical practice, particularly in planning treatment adjustments and optimizing patient care for individuals with migraines in the context of COVID-19 vaccination.