Abstract Background Gestational diabetes mellitus (GDM) is a metabolic disease that occurs in pregnant women and increases the risk for the development of diabetes. The relationship between GDM and meconium microbiota and metabolome remains incompletely understood. Methods Four hundred eighteen mothers (147 women with GDM and 271 normal pregnant women) and their neonates from the GDM Mother and Child Study were included in this study. Meconium microbiota were profiled by 16S rRNA gene sequencing. Meconium and maternal serum metabolome were examined by UPLC-QE. Results Microbial communities in meconium were significantly altered in neonates from the GDM mothers. A reduction in alpha diversity was observed in neonates of GDM mothers. At the phylum level, the abundance of Firmicutes and Proteobacteria changed significantly in neonates of GDM mothers. Metabolomic analysis of meconium showed that metabolic pathways including taurine and hypotaurine metabolism, pyrimidine metabolism, beta-alanine metabolism, and bile acid biosynthesis were altered in GDM subjects. Several changed metabolites varying by the similar trend across the maternal serum and neonatal meconium were observed. Conclusion Altogether, these findings suggest that GDM could alter the serum metabolome and is associated with the neonatal meconium microbiota and metabolome, highlighting the importance of maternal factors on early-life metabolism.