Dietary patterns during pregnancy have been shown to influence the development of gestational diabetes mellitus (GDM). However, evidence from Asian populations is limited and inconsistent. We conducted a prospective cohort study in China to assess the relationship between dietary patterns and GDM. We administered three-day food diaries (TFD) and food frequency questionnaires (FFQ) at the second trimester. GDM was diagnosed with a 75 g 2-h oral glucose tolerance test at 24⁻28 weeks of gestation. We identified dietary patterns using principal components analysis and used multivariable logistic regression to investigate associations of dietary patterns with GDM. Of the 1014 participants, 23.5% were diagnosed with GDM. Both the TFD and FFQ identified a "traditional pattern", consisting of high vegetable, fruit, and rice intake, which was associated with a lower GDM risk (odds ratio (OR) for quartile 4 versus quartile 1: 0.40, 95% CI: 0.23⁻0.71 for traditional pattern (TFD); OR: 0.44, CI: 0.27⁻0.70 for traditional pattern (FFQ)). The protective associations were more pronounced among women ≥35 years old. A whole grain⁻seafood TFD pattern was associated with higher risk of GDM (OR: 1.73, 95% CI: 1.10⁻2.74). These findings may provide evidence for making dietary guidelines among pregnant women in Chinese populations to prevent GDM.