The gut microbiota has been implicated in cancer and shown to modulate anticancer drug efficacy. Altered gut microbiota is associated with resistance to chemo drugs or immune checkpoint inhibitors (ICIs), whereas supplementation of distinct bacterial species restores responses to the anticancer drugs. Accumulating evidence has revealed the potential of modulating the gut microbiota to enhance the efficacy of anticancer drugs. Regardless of the valuable findings by preclinical models and clinical data of patients with cancer, a more thorough understanding of the interactions of the microbiota with cancer therapy helps researchers identify novel strategy for cancer prevention, stratify patients for more effective treatment and reduce treatment complication. In this review, we discuss the scientific evidence on the role of gut microbiota in cancer treatment, and highlight the latest knowledge and technologies leveraged to target specific bacteria that contribute to tumourigenesis. First, we provide an overview of the role of the gut microbiota in cancer, establishing the links between bacteria, inflammation and cancer treatment. Second, we highlight the mechanisms used by distinct bacterial species to modulate cancer growth, immune responses, as well as the efficacy of chemotherapeutic drugs and ICIs. Third, we demonstrate various approaches to modulate the gut microbiota and their potential in translational research. Finally, we discuss the limitations of current microbiome research in the context of cancer treatment, ongoing efforts to overcome these challenges and future perspectives.