Cognitive decline and spinal pain (back pain [BP] and neck pain [NP]) represent a major public health challenge, yet the potential relationship between them remains elusive. A retrospective analysis of the Longitudinal Study of Ageing Danish Twins was performed to determine any potential relationships between BP/NP and cognitive function adjusting for age, sex, educational and socioeconomic status. A total of 4731 adults (2788 females/1943 males) aged 78 ± 6 (SD) years were included in the analysis. We observed a 1‐month prevalence of 25% with BP, 21% with NP and 11% for combined BP/NP. While there were no differences in cognition scores for males and females reporting combined BP/NP, compared to those without combined BP/NP (34.38 points [95% confidence interval (CI) = 31.88, 36.88] vs. 35.72 points [95% CI = 35.19, 36.26]; P = 0.180; and 35.72 points [95% CI = 35.19, 36.26] vs. 35.85 points [95% CI = 35.39, 36.31]; P = 0.327; for male and females, respectively), an adjusted analysis revealed that males with combined BP/NP presented with lower cognitive scores compared to males without combined BP/NP (81.26 points [95% CI = 73.80, 88.72] vs. 79.48 points [95% CI = 70.31, 88.66]; P = 0.043). The findings of this hypothesis‐generating study may highlight a potential sex‐specific association between spinal pain and later‐life neurodegeneration.