Aim To understand the relationship between HbA1c and brain health across the entire glycaemic spectrum. Materials and Methods We used data from the UK Biobank cohort consisting of 500,000 individuals aged 40–69 years. HbA1c and diabetes diagnosis were used to define baseline glycaemic categories. Our outcomes included incident all-cause dementia, vascular dementia (VD), Alzheimer’s dementia (AD), hippocampal volume (HV), white matter hyperintensity (WMH) volume, cognitive function and decline. The reference group was normoglycaemic individuals (HbA1c ≥ 35 & < 42 mmol/mol). Our maximum analytical sample contained 449,973 individuals with complete data. Results Prediabetes and known diabetes increased incident VD (HR 1.54; 95% CI = 1.04, 2.28 and HR 2.97; 95% CI = 2.26, 3.90, respectively). Known diabetes increased all-cause and AD risk (HR 1.91; 95% CI = 1.66, 2.21 and HR 1.84; 95% CI = 1.44, 2.36, respectively). Prediabetes and known diabetes elevated the risks of cognitive decline (OR 1.42; 1.48, 2.96 and OR 1.39; 1.04, 1.75, respectively). Prediabetes, undiagnosed and known diabetes conferred higher WMH volumes (3%, 22% and 7%, respectively) and lower HV (36, 80 and 82 mm3, respectively), whereas low-normal HbA1c had 1% lower WMH volume and 12 mm3 greater HV. Conclusion Both prediabetes and known diabetes are harmful in terms of VD, cognitive decline and AD risks, as well as lower HV. Associations appeared to be somewhat driven by antihypertensive medication, which implies that certain cardiovascular drugs may ameliorate some of the excess risk. Low-normal HbA1c levels, however, are associated with more favourable brain health outcomes and warrant more in-depth investigation.