Antibiotics and dietary habits can affect the gut microbial community, thus influencing disease susceptibility. Although the effect of microbiota on the postnatal environment has been well documented, much less is known regarding the impact of gut microbiota at the embryonic stage. Here we show that maternal microbiota shapes the metabolic system of offspring in mice. During pregnancy, short-chain fatty acids produced by the maternal microbiota dictate the differentiation of neural, intestinal, and pancreatic cells through embryonic GPR41 and GPR43. This developmental process helps maintain postnatal energy homeostasis, as evidenced by the fact that offspring from germ-free mothers are highly susceptible to metabolic syndrome, even when reared under conventional conditions. Thus, our findings elaborate on a link between the maternal gut environment and the developmental origin of metabolic syndrome.