Immune checkpoint blockade (ICB) therapeutics are highly effective in cancer immunotherapy, but gastrointestinal toxicity limited the application. Intestinal microbiota plays a crucial role in ICB-associated colitis. 2′-Fucosyllactose (2′FL) is most abundance prebiotic in human milk that can reshape gut microbiota and exert immune regulatory effect. The study aimed to determine the effects of 2′FL on ICB-associated colitis and to uncover the mediating mechanism. ICB-associated colitis was induced by the ipilimumab and dextran sulfate sodium. Oral administration of 2′FL (0.6 g/(kg∙day)) ameliorated ICB-induced colitis by enhancing regulatory T cells (Treg) and the M2/M1 ratio of macrophages in colon. 2′FL treatment also increased the expression of tight junction proteins (zonula occludens-1 (ZO-1) and mucin 2 (MUC2)) and antioxidant stress indicators (superoxide dismutase (SOD) and catalase (CAT)). In addition, administration of 2′FL increased the abundance of Bifidobacterium and Lactobacillus, and elevated the levels of microbial metabolites, such as indole-3-lactic acid (ILA), which activated the aryl hydrocarbon receptor ligands (AHR) pathway. The protective effect of 2′FL was abolished upon depletion of gut microbiota, and ILA treatment partially simulated the protective effect of 2′FL. Notably, 2′FL did not exhibit inhibition of antitumor immunity. These findings suggest that 2′FL could serve as a potential protective strategy for ICB-associated colitis by modulating the intestinal microbiota and bacterial metabolites.