Elevated vascular disease risk associates with poorer cognitive function, but the mechanism for this link is poorly understood. A leading theory, the structural-functional model argues that vascular risk may drive adverse cardiac remodelling, which in turn leads to chronic cerebral hypoperfusion and subsequent brain structural damage. This model predicts that variation in heart and brain structure should associate with both greater vascular risk and lower cognitive function. This study tests that prediction in a large sample of the UK Biobank (N=11,962). We assemble and summarise vascular risk factors, cardiac magnetic resonance radiomics, brain structural and diffusion MRI indices, and cognitive assessment. We also extract ‘heart-brain axes’ capturing the covariation in heart and brain structure. Many heart and brain measures partially explain the vascular risk— cognitive function association, like left ventricular end-diastolic volume and grey matter volume. Notably, a heart-brain axis, capturing correlation between lower myocardial intensity, lower grey matter volume, and poorer thalamic white matter integrity, completely mediates the association, supporting the structural-functional model. Our findings also complicate this theory by finding that brain structural variation cannot completely explain the heart structure— cognitive function association. Our results broadly offer evidence for the structural functional hypothesis, identify imaging biomarkers for this association by considering covariation in heart and brain structure, and generate novel hypotheses about how cardiovascular risk may link to cognitive function.