BackgroundDepression in chronic disease patients was an important public health problem. However, limited work has been done on how to alleviate the depression of chronic disease patients. This paper attempted to explore the alleviating effect of health insurance and health service quality.MethodsA total of 11,500 middle-aged and elderly people were drawn from four waves (2011, 2013, 2015, and 2018) of the China Health and Retirement Longitudinal Study (CHARLS). We analyzed the effect of chronic disease on depression in middle-aged and elderly people in China, and explored the mechanism of action from health insurance and health service quality.ResultsAfter adjusting for sociodemographic factors, any chronic disease (coefficient 1.471, p < 0.01) and multiple chronic diseases (coefficient 1.733, p < 0.01) could significantly increase the depression score. Any chronic disease increased the depression score (165.3 and 147.4% in non-health insurance group and health insurance group, respectively), the multiple chronic diseases increased the depression score (190.6 and 173.5% in non-health insurance group and health insurance group, respectively). Any chronic disease increased the depression score (161.3 and 139.5% in lower health service quality group and higher health service quality group, respectively), the multiple chronic diseases increased the depression score (228.4 and 162.9% in lower health service quality group and higher health service quality group, respectively). And similar results were obtained after using depression status instead of depression score.ConclusionsChronic disease and multiple chronic diseases were important determinants of depression in middle-aged and elderly people. Health insurance and health service quality were the key factors in relieving the depression of chronic disease patients. Several strategies were urgently needed: paying attention to the mental health of chronic disease patients, increasing the participation rate of health insurance, further improving the quality of health service, and alleviating the psychological harm caused by chronic disease.