This study aims to explore the relationship between internet use and self-rated health among middle-aged and older adults and further investigates the mediating role of health service utilization between internet use and self-rated health, providing a reference for more effectively utilizing the internet to improve the health status of middle-aged and older adults. We analyzed data from the 2018 and 2020 waves of the China Health and Retirement Longitudinal Study (CHARLS), this includes 10,011 in 2018 and 7,080 in 2020 over the age of 45. To explore the relationship between internet use and self-rated health, we employed propensity score matching (PSM) and instrumental variable regression analysis, accounting for a wide range of potential covariates. Additionally, the Sobel test was used to examine the mediating effect of health service utilization on this relationship. According to the fully adjusted propensity score matching and instrumental variable regression model, internet use significantly enhanced self-rated health among middle-aged and older adults (β = 0.348, P < 0.01; β = 0.293, P < 0.1). However, subgroup analyses revealed that this positive effect was not significant among middle-aged and older adults who were divorced (β = 0.190, P > 0.05), lived in special zone (β = -1.379, P > 0.05), and lacked medical insurance (β = 0.314, P > 0.05). Furthermore, mediation analysis revealed that inpatient services (β = 0.0215, P < 0.01) acted as a mediator in the relationship between internet use and self-rated health. Internet use positively correlates with self-rated health among middle-aged and older adults. Additionally, the utilization of health services can significantly influence this relationship. These findings underscore the importance of developing targeted government strategies to promote internet access and create a supportive online environment, thereby enhancing the health outcomes of this demographic group.