Aberrant immune responses to resident microbes promote inflammatory bowel disease and other chronic inflammatory conditions. However, how microbiota-specific immunity is controlled in mucosal tissues remains poorly understood. Here, we find that mice lacking epithelial expression of microbiota-sensitive histone deacetylase 3 (HDAC3) exhibit increased accumulation of commensal-specific CD4 + T cells in the intestine, provoking the hypothesis that epithelial HDAC3 may instruct local microbiota-specific immunity.Consistent with this, microbiota-specific CD4 + T cells and epithelial HDAC3 expression were concurrently induced following early-life microbiota colonization. Further, epithelialintrinsic ablation of HDAC3 decreased commensal-specific Tregs, increased commensalspecific Th17 cells, and promoted T cell-driven colitis. Mechanistically, HDAC3 was essential for NFκB-dependent regulation of epithelial MHC class II (MHCII). Epithelialintrinsic MHCII dampened local accumulation of commensal-specific Th17 cells in adult mice, and protected against microbiota-triggered inflammation. Remarkably, HDAC3 enabled the microbiota to induce MHCII on epithelial cells and limit the number of commensal-specific T cells in the intestine. Collectively, these data reveal a central role for an epithelial histone deacetylase in directing the dynamic balance of tissue-intrinsic CD4 + T cell subsets that recognize commensal microbes and control inflammation.