Gestational diabetes mellitus (GDM) is associated with adverse perinatal outcomes. This study aimed to examine the association between GDM and abnormal vaginal flora, and the association between abnormal vaginal flora and adverse pregnancy outcomes.This was a prospective study of pregnant women who visited Xuanwu Hospital of the Capital Medical University (Beijing, China) between February and October 2015. All women were screened for GDM according to the International Association of the Diabetes and Pregnancy Study Groups (IADPSG) recommendations. Vaginal secretions were sampled at 28 to 30 and 37 to 40 weeks. Microorganisms were examined.The women were 28.3 ± 2.6 years and their body mass index was 22.8 ± 1.4 kg/m2. GDM was associated with higher frequencies of vulvovaginal candidiasis (22.6% vs 9.7%, P < .001), premature rupture of membranes (PROM) (22.6% vs 11.5%, P = .004), premature delivery (16.1% vs 5.5%, P = .02), chorioamnionitis/puerperal infection (19.4% vs 4.5%, P < .001), macrosomia (9.7% vs 4.0%, P = .04), neonatal hypoglycemia (5.4% vs 1.0%, P = .02), and neonatal referral (15.1% vs 6.5%, P = .008). Among healthy women, abnormal flora was associated with PROM (19.4% vs 7.5%, P = .02) and chorioamnionitis/puerperal infection (11.9% vs 0.8%, P < .001). Among women with GDM, abnormal flora was associated with PROM (32.1% vs 10.0%, P < .001), premature delivery (17.7% vs 6.3%, P = .04), and chorioamnionitis/puerperal infection (32.8% vs 2.5%, P < .001).The vaginal infection rate was higher in patients with GDM compared with healthy pregnant women. GDM and abnormal vaginal flora were both associated with adverse pregnancy outcomes. The vaginal Lactobacillus species were different between the 2 groups, which could contribute to the adverse outcomes.