Objective To examine the association between family socioeconomic status (SES) and body mass index (BMI) z-score of children and adolescents, and the mediating effect of milk intake in this association. Methods In the study, 2 496 students and their parents were selected from 16 schools (4 urban middle schools, 4 rural middle schools, 4 urban primary schools, and 4 rural primary schools) using a stratified cluster sampling method. The frequency and amount of weekly milk intake from the 7-day Food Records reported by the students were extracted. The parents' education and household income were the indicators of family SES. The mediating effect of milk intake between family SES and BMI z-score of children and adolescents were tested using the PROCESS add-on SPSS software. Results Parents' education level and household income were positively correlated with BMI z-score of children and adolescents (P=0.001 and 0.038, respectively). The overall average daily intake of milk was (0.92±0.84) servings, and the frequency was (4.43±2.70) days per week. The students of primary school, in urban areas, with higher parents' education level, with higher household income, and being non-obese were likely to have higher frequency and amount of milk intake. Milk intake was one of the mediating factors in the relationship between family SES and BMI z-score of children and adolescents. Specifically, the mediating effect of the frequency of milk intake accounted for -6.57% and -10.21% of the total effects of the association between the parents' education and the household income with BMI z-score of children and adolescents, respectively. The mediating effect of the daily intake of milk accounted for -3.63% and -5.86% of the total effects of the association between the parents' education and the household income with BMI z-score of children and adolescents, respectively. Conclusion The milk intake of Chinese children and adolescents still needs to be improved. High family SES was found to contribute to high BMI z-score, mediated by the milk intake which was the protective factors of BMI z-score. Further research is needed to study other dietary or physical exercise behaviors that mediate the relationship between family SES and BMI z-score of children and adolescents in order to adopt more targeted interventions.