Graft-versus-host disease (GVHD) in the gastrointestinal (GI) tract is the principal determinant of lethality following allogeneic bone marrow transplantation (BMT). Here, we examined the mechanisms that initiate GVHD, including the relevant antigen-presenting cells. MHC class II was expressed on intestinal epithelial cells (IECs) within the ileum at steady state but was absent from the IECs of germ-free mice. IEC-specific deletion of MHC class II prevented the initiation of lethal GVHD in the GI tract. MHC class II expression on IECs was absent from mice deficient in the TLR adaptors MyD88 and TRIF and required IFNγ secretion by lamina propria lymphocytes. IFNγ responses are characteristically driven by IL-12 secretion from myeloid cells. Antibiotic-mediated depletion of the microbiota inhibited IL-12/23p40 production by ileal macrophages. IL-12/23p40 neutralization prevented MHC class II upregulation on IECs and initiation of lethal GVHD in the GI tract. Thus, MHC class II expression by IECs in the ileum initiates lethal GVHD, and blockade of IL-12/23p40 may represent a readily translatable therapeutic strategy. Graft-versus-host disease in the gastrointestinal tract is the principal determinant of lethality following allogeneic bone marrow transplantation. Koyama et al. find that MHC class II-dependent antigen presentation by ileal intestinal epithelial cells (IECs) is critical for the initiation of lethal GVHD in the gut, define the requirements for IEC MHC class II expression, and propose IL-12 neutralization as a therapeutic strategy for GVHD.