BackgroundPreterm birth is the leading cause of perinatal morbidity and mortality. Despite evidence shows that imbalances in the maternal microbiome associates to the risk of preterm birth, the mechanisms underlying the association between a perturbed microbiota and preterm birth remain poorly understood.MethodApplying shotgun metagenomic analysis on 80 gut microbiotas of 43 mothers, we analyzed the taxonomic composition and metabolic function in gut microbial communities between preterm and term mothers.ResultsGut microbiome of mothers delivering prematurely showed decreased alpha diversity and underwent significant reorganization, especially during pregnancy. SFCA-producing microbiomes, particularly species ofLachnospiraceae, Ruminococcaceae, andEubacteriaceae, were significantly depleted in preterm mothers.Lachnospiraceaeand its species were the main bacteria contributing to species’ differences and metabolic pathways.ConclusionGut microbiome of mothers delivering prematurely has altered and demonstrates the reduction ofLachnospiraceae.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12866-023-02892-z.