Animal data suggest sexually dimorphic programming of obesity in response to altered intrauterine environment, but the longitudinal impact of gestational diabetes mellitus (GDM) on sex-specific risk of offspring obesity in humans is unclear. We conducted a prospective analysis of 15 009 US individuals (7946 female and 7063 male) from the Growing-Up Today Study, who were followed from 1996 (ages 9-14 years) through 2010. Height and weight from validated questionnaires were used to derive body mass index (BMI) at different ages. Obesity during childhood (< 18 years) and adulthood (≥ 18 years) were defined using the International Obesity Task Force and the World Health Organization criteria. GDM exposure was identified through self-reported questionnaires from mothers. Relative risks were estimated using multivariable log-binomial regression models with generalized estimating equations accounting for clustering within the same family. Male offspring born from pregnancies complicated by GDM had higher BMI compared with non-GDM offspring and had increased risk of obesity; the adjusted relative risk [RR, 95% confidence interval (CI)] was 1.47 (1.11-1.95) for all age groups, 1.59 (1.05-2.41) for late childhood, 1.48 (1.06-2.06) for adolescence and 1.39 (1.00-1.94) for early adulthood. No significant association between obesity and maternal GDM was observed among female participants (RR = 0.97, 95% CI: 0.71-1.33). The association of GDM with offspring obesity from late childhood through early adulthood may differ by sex; a significant association was observed among male but not female offspring.