The composition of the intestinal microbiota influences the development of inflammatory disorders. However, associating inflammatory diseases with specific microbial members of the microbiota is challenging, because clinically detectable inflammation and its treatment can alter the microbiota's composition. Immunologic checkpoint blockade with ipilimumab, a monoclonal antibody that blocks cytotoxic T-lymphocyte-associated antigen-4 (CTLA-4) signalling, is associated with new-onset, immune-mediated colitis. Here we conduct a prospective study of patients with metastatic melanoma undergoing ipilimumab treatment and correlate the pre-inflammation faecal microbiota and microbiome composition with subsequent colitis development. We demonstrate that increased representation of bacteria belonging to the Bacteroidetes phylum is correlated with resistance to the development of checkpoint-blockade-induced colitis. Furthermore, a paucity of genetic pathways involved in polyamine transport and B vitamin biosynthesis is associated with an increased risk of colitis. Identification of these biomarkers may enable interventions to reduce the risk of inflammatory complications following cancer immunotherapy.