Previous studies only assessed the association between depressive symptoms and risk of preterm birth (PTB) at a time-point during pregnancy, resulting in inconsistent or contradictory results. Therefore, we aimed to explore the associations between the trajectories of depressive symptoms during pregnancy and risk of PTB. In total, 7732 pregnant women were included in 24 hospitals from 15 provinces of China. The Edinburgh Postpartum Depression Scale (EPDS) was used to evaluate depressive symptoms in the first, second, and third trimesters. Associations between depressive symptoms and risk of PTB were performed by group-based trajectory modeling (GBTM), propensity score-based inverse probability of treatment weighting (IPTW), and logistic regression. GBTM identified five trajectories: compared with persistently low-stable trajectory of depressive symptoms, women with moderate-stable (OR = 1.23, 95% CI: 1.02-1.76), high-falling (OR = 1.35, 95% CI: 1.11-2.21), moderate-rising (OR = 1.38, 95% CI: 1.06-2.04), and high-stable trajectory of depressive symptoms (OR = 1.40, 95% CI: 1.16-3.28) had an increased risk of PTB. In addition, the associations between trajectories of depressive symptoms and risk of PTB were most significant in multiparous women with a history of PTB. There was no difference in the risk of early-moderate PTB among different trajectories of depressive symptoms and only the risk of late PTB was different among different trajectories. In conclusion, the depressive symptoms of pregnant women were not constant during pregnancy, and different trajectories of depressive symptoms were associated with different risks of PTB.