Numerous bacterial pathogens infect the mammalian host by initially associating with epithelial cells that line the intestinal lumen. Recent work has revealed that commensal bacteria that reside in the intestine promote defense against pathogenic infection, however whether the microbiota direct host pathways that alter pathogen adherence is not well-understood. Here, by comparing germ-free mice, we identify that the microbiota decrease bacterial pathogen adherence and dampen epithelial expression of the cell surface glycoprotein C-type lectin 2e (Clec2e). Functional studies revealed that overexpression of this lectin promotes adherence of intestinal bacterial pathogens to mammalian cells. Interestingly, microbiota-sensitive downregulation of Clec2e corresponds with decreased histone acetylation of the Clec2e gene in intestinal epithelial cells. Histone deacetylation and transcriptional regulation of Clec2e depends on expression and recruitment of the histone deacetylase HDAC3. Thus, commensal bacteria epigenetically instruct epithelial cells to decrease expression of a C-type lectin that promotes pathogen adherence, revealing a novel mechanism for how the microbiota promote innate defense against infection.