Obesity is associated with a cluster of metabolic disorders, low-grade inflammation and altered gut microbiota. Whether host metabolism is controlled by intestinal innate immune system and the gut microbiota is unknown. Here we report that inducible intestinal epithelial cell-specific deletion of MyD88 partially protects against diet-induced obesity, diabetes and inflammation. This is associated with increased energy expenditure, an improved glucose homeostasis, reduced hepatic steatosis, fat mass and inflammation. Protection is transferred following gut microbiota transplantation to germ-free recipients. We also demonstrate that intestinal epithelial MyD88 deletion increases anti-inflammatory endocannabinoids, restores antimicrobial peptides production and increases intestinal regulatory T cells during diet-induced obesity. Targeting MyD88 after the onset of obesity reduces fat mass and inflammation. Our work thus identifies intestinal epithelial MyD88 as a sensor changing host metabolism according to the nutritional status and we show that targeting intestinal epithelial MyD88 constitutes a putative therapeutic target for obesity and related disorders.