Background: Dietary habits and weight control before pregnancy are important in preventing gestational diabetes. This study aims to examine whether the weight-loss behavior of avoiding between meal and midnight snacks in teenagers is associated with subsequent gestational diabetes mellitus (GDM).Methods: A total of 89,227 (85.7% of the total) mother-infant pairs of live births were included in our study of the Japan Environment and Children's Study (JECS). In the second or third trimesters, participants were asked to report their weight-loss behaviors during their teenage years. Response items included avoidance of meals and midnight snacking. The main outcome of our study was the prevalence of GDM.Results: Overall, 2,066 (2.3%) participants had GDM. Relative to those without GDM, women with GDM were older, were smokers, had a higher prevalence of hypertension, previous cesarean delivery, mental illness, and higher body mass index (BMI). Weight-loss behavior in their teenage years was associated with a decreased risk of GDM (unadjusted crude odds ratio, 0.83; 95% confidence interval [CI]: 0.76–0.91), model 1 (adjusted odds ratio [aOR], 0.86; 95% CI: 0.79–0.94), and model 2 (aOR, 0.80; 95% CI: 0.73–0.88). Weight-loss behavior in teens was associated with a decreased risk of GDM in the normal weight [aOR, 0.79; 95% CI: 0.70–0.89) and overweight (aOR, 0.82; 95% CI: 0.69–0.98) groups.Conclusions: The results suggest that weight-loss behaviors of avoiding in-between meals and midnight snacking as teenagers are associated with a decreased risk of developing GDM.