The joint involvement of family and society in elderly care is a crucial factor in improving the health status of older adults and narrowing health disparities, which are essential for achieving sustainable development goals. However, the interactions between these entities and their mechanisms of influence require further investigation. By utilizing data from the China Longitudinal Aging Social Survey (CLASS) spanning 2014 to 2016 and employing the Kakwani index of individual relative deprivation in conjunction with a two-way fixed-effects model for unbalanced panel data, in this study, we investigated the mechanisms through which social elderly care security and familial support influence health inequalities among the elderly. The findings reveal that only senior benefits (=−0.009, p < 0.05) significantly mitigate relative health deprivation in this population. Enrollment in pension insurance amplifies the sense of relative health deprivation among the elderly, but this effect becomes insignificant after controlling for temporal effects. Both economic support (=−0.002, p < 0.05) and emotional support (=−0.004, p < 0.01) from offspring significantly reduce the level of relative health deprivation among the elderly. Mechanism testing results indicate that individual attitudes towards aging serve as a mediator in the relationship between relative health deprivation and preferential treatment, economic support, and emotional support. The results of further heterogeneity tests suggest that the impact of various elderly support models on relative health deprivation differs by age, gender, and residential area.These findings confirm that support from both society and family plays a crucial role in achieving sustainable health outcomes for the elderly. Consequently, it is recommended to enhance the social elderly care security system, bolster familial support functions, cultivate positive individual attitudes towards aging, and address health inequalities among the elderly in accordance with their distinct characteristics, thereby improving their quality of life and sense of fulfillment, and contributing to the broader goals of sustainable development.