Objective To understand the relationship between the eating behaviors of primary and middle school students in Shunyi District and overweight and obesity, and to effectively guide the reasonable eating behavior of primary and secondary school students, and provide a basis for ensuring their healthy growth. Methods A multi-layer cluster random sampling method was used to conduct a questionnaire survey of 1212 primary and middle school students in Shunyi District in July 2017. Logistic multiple regression analysis was performed on related factors. Results The detection rate of overweight and obesity was 35.53%, including 42.66% for boys and 28.87% for girls. The difference was statistically significant (χ^2= 24.852,P<0.01). Multivariate analysis showed that males were risk factors for overweight and obesity among students (OR=1.863, 95% CI=1.455~2.384);while eating breakfast is a protective factor for students with overweight and obesity, eating breakfast every day (OR=0.164, 95% CI=0.058~0.464), sometimes eating breakfast (OR=0.166, 95% CI= 0.058 ~ 0.478). Conclusion There is a high rate of overweight and obesity among primary and middle school students in Shunyi District. There is a correlation between healthy eating behavior and overweight and obesity. All departments should strengthen nutrition and health knowledge education to ensure the healthy growth of students.