BackgroundImmunotherapies, notably immune checkpoints inhibitors that target programmed death 1/programmed death ligand 1(PD‐1/PD‐L1) and cytotoxic T lymphocyte‐associated antigen 4 (CTLA‐4), had profoundly changed the way advanced and metastatic cancers are treated and dramatically improved overall and progression‐free survival.AimsThis review article aimed to explore the underlying molecular mechanisms by which the gut microbiota affects antitumor immunity and the efficacy of cancer immunotherapy.MethodsWe summarized the latest knowledge supporting the associations among the gut microbiota, antitumor immunity, and immunotherapy. Moreover, we disscussed the therapeutic strategy for improving immunotherapy efficacy by modulating gut microbiota in cancer treatment.ResultsThe potential molecular mechanisms underlying these associations are explained in terms of four aspects: immunomodulation, molecular mimicry, mamps, and microbial metabolites.ConclusionThe gut microbiota significantly impacts antitumor immunity and alters the effectiveness of cancer immunotherapy.