The obesity rate is rapidly increasing, which has been attributed to lack of exercise and excessive energy intake. Here, we found a previously unidentified explanation, due to lack of maternal exercise. In this study, healthy maternal mice were assigned either to a sedentary lifestyle or to exercise daily, and fetal brown adipose tissue (BAT) development and offspring metabolic health were analyzed. Compared to the sedentary group, maternal exercise enhanced DNA demethylation of Prdm16 promoter and BAT development and prevented obesity of offspring when challenged with a high-energy diet. Apelin, an exerkine, was elevated in both maternal and fetal circulations due to exercise, and maternal administration of apelin mimicked the beneficial effects of exercise on fetal BAT development and offspring metabolic health. Together, maternal exercise enhances thermogenesis and the metabolic health of offspring mice, suggesting that the sedentary lifestyle during pregnancy contributes to the obesity epidemic in modern societies.