The Healthy China Strategy puts realistic demands for residents' health levels, but the reality is that various factors can affect health. In order to clarify which factors have a great impact on residents' health, based on China's provincial panel data from 2011 to 2018, this paper selects 17 characteristic variables from the three levels of economy, environment, and society and uses the XG boost algorithm and Random forest algorithm based on recursive feature elimination to determine the influencing variables. The results show that at the economic level, the number of industrial enterprises above designated size, industrial added value, population density, and per capita GDP have a greater impact on the health of residents. At the environmental level, coal consumption, energy consumption, total wastewater discharge, and solid waste discharge have a greater impact on the health level of residents. Therefore, the Chinese government should formulate targeted measures at both economic and environmental levels, which is of great significance to realizing the Healthy China strategy.