To identify associations between Hb concentration in different trimesters, Hb changes and Hb trajectories during pregnancy with risk of preterm birth (PTB) and low birth weight (LBW). A retrospective cohort study included 18 980 participants from Haidian District Maternal and Child Health Care Hospital from 2018–2021. Hb concentrations were measured at first (0–12 weeks), second (13–27 weeks) and third trimesters (≥ 28 weeks). Hb was categorised into four groups (< 110, 110–119, 120–129, ≥ 130 g/l), and Hb changes between trimesters were calculated. The latent class growth mixed model was employed to estimate Hb trajectories. Association assessment and dose–response relationship used logistic regression and restricted cubic spline. Compared with Hb 110–119 g/l, women with Hb ≥ 130 g/l significantly increased odds of PTB (OR: 1·74, 95 % CI 1·29, 2·31) and LBW (OR: 2·31, 95 % CI 1·65, 3·20) during the second trimester. In the third trimester, women with Hb 120–129 g/l showed 26 % (OR: 1·26, 95 % CI 1·04, 1·51) increased odds of PTB and 72 % (OR: 1·72, 95 % CI 1·36, 2·17) increased odds of LBW, while the OR of Hb ≥ 130 g/l for PTB and LBW were 1·45 (95 % CI 1·12, 1·86) and 2·60 (95 % CI 1·96, 3·43). Hb changes exhibited a linear increase in odds of PTB and LBW. Women with a decline-sharp-rise trajectory had a 1·48-fold odds of PTB (OR: 1·48, 95 % CI 1·26, 1·75), compared with a decline-gradual-rise trajectory. These findings underscore the importance of monitoring Hb during pregnancy.