Preterm birth is a major challenge in pregnancy worldwide. Prematurity is the leading cause of death in infants and may result in severe complications. Nearly half of preterm births are spontaneous, but do not have recognizable causes. This study investigated whether the maternal gut microbiome and associated functional pathways might play a key role in spontaneous preterm birth (sPTB). Two hundred eleven women carrying singleton pregnancies were enrolled in this mother-child cohort study. Fecal samples were freshly collected at 24–28 weeks of gestation before delivery, and the 16S ribosomal RNA gene was sequenced. Microbial diversity and composition, core microbiome, and associated functional pathways were then statistically analyzed. Demographic characteristics were collected using records from the Medical Birth Registry and questionnaires. The result showed that the gut microbiome of mothers with over-weight (BMI ≥ 24) before pregnancy have lower alpha diversity than those with normal BMI before pregnancy. A higher abundance ofActinomycesspp. was filtered out from the Linear discriminant analysis (LDA) effect size (LEfSe), Spearman correlation, and random forest model, and was inversely correlated with gestational age in sPTB. The multivariate regression model showed that the odds ratio of premature delivery was 3.274 [95% confidence interval (CI): 1.349;p= 0.010] in the group with over-weight before pregnancy with a cutoff Hit% > 0.022 forActinomycesspp. The enrichment ofActinomycesspp. was negatively correlated with glycan biosynthesis and metabolism in sPTB by prediction from the Investigation of Communities by Reconstruction of Unobserved States (PICRUSt) platform. Maternal gut microbiota showing a lower alpha diversity, increased abundance ofActinomycesspp., and dysregulated glycan metabolism may be associated with sPTB risk.