The intestinal microbiota has been identified as an environmental factor that markedly affects energy storage and body-fat accumulation in mammals, yet the underlying mechanisms remain unclear. Here we show that the microbiota regulates body composition through the circadian transcription factor NFIL3. Nfil3 transcription oscillates diurnally in intestinal epithelial cells, and the amplitude of the circadian oscillation is controlled by the microbiota through group 3 innate lymphoid cells, STAT3 (signal transducer and activator of transcription 3), and the epithelial cell circadian clock. NFIL3 controls expression of a circadian lipid metabolic program and regulates lipid absorption and export in intestinal epithelial cells. These findings provide mechanistic insight into how the intestinal microbiota regulates body composition and establish NFIL3 as an essential molecular link among the microbiota, the circadian clock, and host metabolism.