To systematically investigate the association between the dietary inflammatory index (DII) and gestational diabetes mellitus (GDM), with a focus on the role of BMI in this relationship. A comprehensive search was conducted in PubMed, Embase, Web of Science, The Cochrane Library, Medline, CINAHL Complete, Chinese Periodical Full-text Database, China National Knowledge Infrastructure, Chinese Biomedical Literature Database, and China Wanfang Database for rele-vant observational studies published up to August 2023. The quality of the included studies was assessed using the Newcastle-Ottawa Scale. The pooled effect size was calculated using a random-effects model. Sub-group and meta-regression analyses were performed to explore potential sources of heterogeneity. The study included 54,058 participants from 10 studies. Pregnant women with a higher DII, indicating a pro-inflammatory diet, had a significantly increased risk of GDM compared to those with a lower DII, indicating an anti-inflammatory diet (pooled OR: 1.17, 95% CI: 1.01-1.36; I²=70%, p <0.001). Subgroup analyses revealed a stronger association in normal weight stratification (OR: 1.25, 95%CI: 1.04-1.51), case-control studies (OR: 1.45, 95%CI: 1.03-2.05), Asia (OR: 1.26, 95%CI: 1.10-1.43), Europe (OR: 1.27, 95%CI: 1.09-1.48), 3-day dietary record as a dietary assessment tool (OR: 1.30, 95%CI: 1.16-1.46), physical activity adjustment (OR: 1.28, 95%CI: 1.13-1.46), and energy intake adjustment (OR: 1.33, 95%CI: 1.19-1.48). Meta-regression analysis confirmed that geographical region significantly influenced heterogeneity between studies (p <0.05). An elevated DII is independently linked to a higher risk of GDM, especially in women of normal weight.