BackgroundChina has the world’s largest mobile population. As mobility increases, ensuring the health protection of this population is receiving more attention. Strengthening public health education is a crucial measure to improve their health and achieve equal access to basic public health services in China. Previous research has demonstrated that public health education has an impact on the health of mobile populations. However, there has been limited investigation into the mediating pathways through which health education influences the health of mobile populations, and few studies have examined the heterogeneity of this effect.ObjectivesThe aim of this study was to analyze the impact of public health education on the health of the mobile population and its mechanism of action. Additionally, we aimed to explore the differences in this impact among different subdivided groups.MethodsThis paper analyses the impact of public health education on the health of the mobile population using the 2018 China Migrant Dynamic Survey (CMDS) Data,. The data was cleaned and 4,034 people were included in the analysis. The study employed ordered logistic regression modeling to analyze the mediating pathways through which health education affects health. Additionally, binary logistic regression model, probit model, propensity score matching method and instrumental variables were used to verify the robustness of the results.ResultsThe self-assessed health status of the mobile population was good, and 82.10% of them accepted public health education. However, 17.89% of the mobile population did not receive any health education. Acceptance of health education can help improve the health status of the mobile population (OR = 1.178, 95% CI = 0.979–1.418). The study found that public health education can positively impact the health of mobile populations by influencing their health and hospitalization behaviors, as well as their social support. The analysis of heterogeneity revealed that the impact of public health education is more significant among rural, middle-aged, low-education, and low-income groups of the mobile population.ConclusionPublic health education can have a positive impact on the health of the migrant populations. To further improve health education for this group, it is necessary to actively promote the establishment of health records for the migrant population, to facilitate the contracting of family doctors by the migrant population, to improve the accessibility to hospitalization services, reduce the burden of hospitalization costs, and enhance social support. Simultaneously, it is essential to offer precise and varied health education to the migrant population based on their characteristics, to promote equity among diverse groups of individuals. These findings not only help to enrich theoretical research on health education for migrant populations and the health of migrant populations but also help to improve the level of public health education for migrant populations and improve the health protection of migrant populations.