The gut microbiota is influenced by environmental factors such as food. Maternal diet during pregnancy modifies the gut microbiota composition and function, leading to the production of specific compounds that are transferred to the fetus and enhance the ontogeny and maturation of the immune system. Prebiotics are fermented by gut bacteria, leading to the release of short-chain fatty acids that can specifically interact with the immune system, inducing a switch toward tolerogenic populations and therefore conferring health benefits. In this study, pregnant BALB/cJRj mice were fed either a control diet or a diet enriched in prebiotics (Galacto-oligosaccharides/Inulin). We hypothesized that galacto-oligosaccharides/inulin supplementation during gestation could modify the maternal microbiota, favoring healthy immune imprinting in the fetus. Galacto-oligosaccharides/inulin supplementation during gestation increases the abundance of Bacteroidetes and decreases that of Firmicutes in the gut microbiota, leading to increased production of fecal acetate, which was found for the first time in amniotic fluid. Prebiotic supplementation increased the abundance of regulatory B and T cells in gestational tissues and in the fetus. Interestingly, these regulatory cells remained later in life. In conclusion, prebiotic supplementation during pregnancy leads to the transmission of specific microbial and immune factors from mother to child, allowing the establishment of tolerogenic immune imprinting in the fetus that may be beneficial for infant health outcomes.