Microbiota influence diverse aspects of intestinal physiology and disease in part by controlling tissue-specific transcription of host genes. However, host genomic mechanisms mediating microbial control of intestinal gene expression are poorly understood. Hepatocyte nuclear factor 4 (HNF4) is the most ancient family of nuclear receptor transcription factors with important roles in human metabolic and inflammatory bowel diseases, but a role in host response to microbes is unknown. Using an unbiased screening strategy, we found that zebrafish Hnf4a specifically binds and activates a microbiota-suppressed intestinal epithelial transcriptional enhancer. Genetic analysis revealed that zebrafish hnf4a activates nearly half of the genes that are suppressed by microbiota, suggesting microbiota negatively regulate Hnf4a. In support, analysis of genomic architecture in mouse intestinal epithelial cells disclosed that microbiota colonization leads to activation or inactivation of hundreds of enhancers along with drastic genome-wide reduction of HNF4A and HNF4G occupancy. Interspecies meta-analysis suggested interactions between HNF4A and microbiota promote gene expression patterns associated with human inflammatory bowel diseases. These results indicate a critical and conserved role for HNF4A in maintaining intestinal homeostasis in response to microbiota.