Studies in mice indicate that the gut microbiota promotes energy harvest and storage from components of the diet when these components are plentiful. Here we examine how the microbiota shapes host metabolic and physiologic adaptations to periods of nutrient deprivation. Germ-free (GF) mice and mice who had received a gut microbiota transplant from conventionally raised donors were compared in the fed and fasted states by using functional genomic, biochemical, and physiologic assays. A 24-h fast produces a marked change in gut microbial ecology. Short-chain fatty acids generated from microbial fermentation of available glycans are maintained at higher levels compared with GF controls. During fasting, a microbiota-dependent, Ppar alpha-regulated increase in hepatic ketogenesis occurs, and myocardial metabolism is directed to ketone body utilization. Analyses of heart rate, hydraulic work, and output, mitochondrial morphology, number, and respiration, plus ketone body, fatty acid, and glucose oxidation in isolated perfused working hearts from GF and colonized animals (combined with in vivo assessments of myocardial physiology) revealed that the fasted GF heart is able to sustain its performance by increasing glucose utilization, but heart weight, measured echocardiographically or as wet mass and normalized to tibial length or lean body weight, is significantly reduced in both fasted and fed mice. This myocardial-mass phenotype is completely reversed in GF mice by consumption of a ketogenic diet. Together, these results illustrate benefits provided by the gut microbiota during periods of nutrient deprivation, and emphasize the importance of further exploring the relationship between gut microbes and cardiovascular health.