BackgroundThis study aims to investigate the relationships between the Chinese Healthy Eating Index (CHEI), psychological balance, depressive symptoms, and cognitive function in the rural older population. Additionally, it examines the impact of CHEI on cognitive function and the potential chain mediating roles of psychological balance and depressive symptoms.MethodsThe study utilized data from 2,552 rural older adults aged 65 and above, drawn from the Chinese Longitudinal Healthy Longevity Study (CLHLS). The CHEI was self-reported, with scores ranging from 0 to 50, representing adherence to healthy eating habits. Psychological balance was assessed using status and personality-emotion characteristics recorded in the database, with scores ranging from 6 to 30. Cognitive function was measured using the Mini-Mental State Examination (MMSE), with scores ranging from 0 to 30; higher scores indicated better cognitive function. Depressive symptoms were evaluated using the 10-item Center for Epidemiologic Studies Depression Scale (CESD-10), with scores ranging from 0 to 30, where higher scores reflected more severe depressive symptoms.ResultsThe median CHEI score was 40.0 (IQR: 34.0–45.0), reflecting moderate adherence to healthy dietary practices. The median Psychological Balance score was 19.0 (IQR: 17.0–21.0), and the median Depressive Symptoms score was 13.0 (IQR: 10.0–15.0), indicating mild depressive symptoms among participants. Additionally, the median Cognitive Function score was 28.0 (IQR: 27.0–29.0), suggesting relatively stable cognitive abilities within the sample. Correlational analysis revealed the following: (1) Depressive symptoms were negatively correlated with both cognitive function (rs = -0.100, p < 0.001) and CHEI (rs = -0.206, p < 0.001), as well as with psychological balance (rs = -0.142, p < 0.001). (2) CHEI was positively correlated with both cognitive function (rs = 0.144, p < 0.001) and psychological balance (rs = 0.131, p < 0.001). (3) Cognitive function was also positively correlated with psychological balance (rs = 0.096, p < 0.001). Mediation analysis demonstrated that both psychological balance and depressive symptoms partially mediated the relationship between CHEI and cognitive function, forming a chain-mediating effect.ConclusionThe Chinese Healthy Eating Index was found to have a direct positive impact on cognitive function in rural older adults. Furthermore, it exerted an indirect effect through the independent and chain-mediating roles of psychological balance and depressive symptoms. These findings suggest that dietary adherence can influence cognitive health not only directly but also by improving psychological well-being and reducing depressive symptoms.