White matter hyperintensities index structural abnormalities in the cerebral white matter, including axonal damage. The latter may promote atrophy of the cerebral cortex, a key feature of dementia. Here, we report a study of 51,065 individuals from 10 cohorts demonstrating that higher white matter hyperintensity volume associates with lower cortical thickness. The meta-GWAS of white matter hyperintensities-associated cortical ‘atrophy’ identifies 20 genome-wide significant loci, and enrichment in genes specific to vascular cell types, astrocytes, and oligodendrocytes. White matter hyperintensities-associated cortical ‘atrophy’ showed positive genetic correlations with vascular-risk traits and plasma biomarkers of neurodegeneration, and negative genetic correlations with cognitive functioning. 15 of the 20 loci regulated the expression of 54 genes in the cerebral cortex that, together with their co-expressed genes, were enriched in biological processes of axonal cytoskeleton and intracellular transport. The white matter hyperintensities-cortical thickness associations were most pronounced in cortical regions with higher expression of genes specific to excitatory neurons with long-range axons traversing through the white matter. The meta-GWAS-based polygenic risk score predicts vascular and all-cause dementia in an independent sample of 500,348 individuals. Thus, the genetics of white matter hyperintensities-related cortical atrophy involves vascular and neuronal processes and increases dementia risk.