Understanding the association between autonomic nervous system [ANS] function and brain morphology across the lifespan provides important insights into neurovisceral mechanisms underlying health and disease. Resting state ANS activity, indexed by measures of heart rate [HR] and its variability [HRV] has been associated with brain morphology, particularly cortical thickness [CT]. While findings have been mixed regarding the anatomical distribution and direction of the associations, these inconsistencies may be due to sex and age differences in HR/HRV and CT. Previous studies have been limited by small sample sizes, which impede the assessment of sex differences and aging effects on the association between ANS function and CT. To overcome these limitations, 20 groups worldwide contributed data collected under similar protocols of CT assessment and HR/HRV recording to be pooled in a mega-analysis (N = 1,218 (50.5% female), mean age 36.7 years (range: 12-87)). Findings suggest that the decline in HRV with increasing age is related to a decline in prefrontal CT, particularly in the orbitofrontal cortex. These effects were independent of sex and specific to HRV; with no significant association between CT and HR. Greater CT across the adult lifespan may be vital for the maintenance of healthy cardiac regulation via the ANS. Nonetheless, in the absence of longitudinal data, alternative explanations need to be considered. Findings reveal an important association between cortical thickness and cardiac parasympathetic activity with implications for healthy aging and longevity.