The purpose of this study was to investigate the effects of maternal gestational diabetes mellitus (GDM) and breast feeding on childhood overweight and obesity in a mainland Chinese population. The incidence of and factors associated with overweight and obesity were compared between children of mothers with (n=1068) and without (n=1756) GDM. The independent roles of the associated factors were examined by multiple logistic regression analysis. The incidence of overweight was higher (16.6 v. 12.6%, P=0.002) in the GDM group, but that of obesity was not different (10.7 v. 12.0%, P=0.315). At age 1–2 and 2–5 years, no difference in overweight (11.0 v. 12.0%, P=0.917, and 15.7 v. 14.6%, P=0.693, respectively) was found, while obesity (8.0 v. 13.6%, P=0.019, and 8.4 v. 13.4%, P=0.014, respectively) was less frequent in the GDM offspring. At age 5–10 years, increased overweight (22.2 v. 12.1%, P<0.001) and obesity (15.9 v. 9.0%, P=0.001) were found in the GDM group, which was associated with maternal obesity, being born large-for-gestational age, male gender and formula feeding. After adjusting for confounding factors, GDM remained an independent determinant of offspring overweight and obesity (aOR 2.28, 95% CI 1.61–3.22), suggesting that the effects of GDM were independent of breast feeding, as well as of maternal obesity and birth size.