Transplantation is the only cure for end-stage organ failure, but without immunosuppression, T cells rapidly reject allografts. While genetic disparities between donor and recipient are major determinants of the kinetics of transplant rejection, little is known about the contribution of environmental factors. Because colonized organs have worse transplant outcome than sterile organs, we tested the influence of host and donor microbiota on skin transplant rejection. Compared with untreated conventional mice, pretreatment of donors and recipients with broad-spectrum antibiotics (Abx) or use of germ-free (GF) donors and recipients resulted in prolonged survival of minor antigen–mismatched skin grafts. Increased graft survival correlated with reduced type I IFN signaling in antigen-presenting cells (APCs) and decreased priming of alloreactive T cells. Colonization of GF mice with fecal material from untreated conventional mice, but not from Abx-pretreated mice, enhanced the ability of APCs to prime alloreactive T cells and accelerated graft rejection, suggesting that alloimmunity is modulated by the composition of microbiota rather than the quantity of bacteria. Abx pretreatment of conventional mice also delayed rejection of major antigen–mismatched skin and MHC class II–mismatched cardiac allografts. This study demonstrates that Abx pretreatment prolongs graft survival, suggesting that targeting microbial constituents is a potential therapeutic strategy for enhancing graft acceptance.