Most previous studies focusing on the migraine headache-dementia relationship have failed to simultaneously adjust for several common comorbidities.The goal of this retrospective cohort study was to investigate the association between migraine headaches and dementia in general practices in the UK.The current study sample included patients who received a migraine diagnosis in one of 67 general practices in the UK between January 1997 and December 2016 (index date). Patients without migraine diagnoses were matched 1 : 1 to patients with migraine diagnoses based on propensity scores using a greedy algorithm and derived from the logistic regression using age, sex, index year, and co-diagnoses. The main outcome of the study was the association between migraine headaches and the incidence of dementia within 10 years of the index date.This study included 7,454 individuals with or without migraine diagnoses. Mean age was 67.7 years (SD = 5.8 years), and 72.9% of patients were women. Within 10 years of the index date, 5.2% of participants with and 3.7% of those without migraine headaches were diagnosed with dementia (log-rank p < 0.001). The respective figures were 5.8% and 3.6% in women (log-rank p < 0.001) and 4.5% and 3.4% in men (log-rank p = 0.722). We observed a positive association between migraine diagnoses and all-cause dementia (hazard ratio [HR] = 1.43) as well as Alzheimer's disease (HR = 1.87). Sensitivity analyses further revealed that these associations were only significant in women (all-cause dementia: HR = 1.65; Alzheimer's disease: HR = 2.27).Migraine diagnoses were positively associated with all-cause dementia and Alzheimer's disease in women.