BackgroundCurrently, gastric cancer (GC) and colorectal cancer (CRC) are the most common causes of cancer-related mortality worldwide. Gut microbiota is closely related to the occurrence of GC and CRC and the efficacy of chemotherapy. This study is aimed at evaluating the efficacy and safety of herbal formulas with the function of gut microbiota regulation (HFGMR) in the treatment of GC and CRC and to assess the quality of the synthesized evidence.MethodsA comprehensive search was performed on eight electronic databases, PubMed, EMBASE, CENTRAL, Web of Science, Chinese Biomedical Literature Database, China National Knowledge Infrastructure, Wanfang database, Chinese Scientific Journals Database, and two registries, Chinese Clinical Trial Registry and ClinicalTrials.gov, from their initiation to January 2022. Randomized controlled trials (RCTs) studying the therapeutic effects of HFGMR were included. We used Stata 16 for data synthesis and Risk of Bias 2 (RoB 2) for methodological quality evaluation and assessed the quality of the synthesized evidence in the Grading of Recommendations, Assessment, Development and Evaluations (GRADE) approach.ResultsFifty-three RCTs involving 4,478 patients were included. These trials involve seven herbal formulas that could regulate the gut microbiota of Bifidobacterium, Lactobacillus, Escherichia coli, Bacteroides, and Enterococcus faecalis. The meta-analysis results were subgrouped to three different stages in GC and CRC. 1) For the perioperative stage, HFGMR combined with conventional therapy could shorten the time to bowel sound recovery by 1.63 h [mean difference (MD) = −1.63, 95% confidence interval (CI) (−2.62, −0.65)], the time to first flatus by 9.69 h [MD = −9.69, 95% CI (−10.89, −8.48)], and the duration of hospitalization by 2.91 days [MD = −2.91, 95% CI (−4.01, −1.80)] in GC. There were no significant differences in outcomes of gastrointestinal function recovery and adverse events in CRC. 2) For postoperative patients, combined with adjuvant chemotherapy, HFGMR could decrease the incidence of diarrhea, nausea and vomiting, anorexia, and peripheral neurotoxicity in GC; boost Karnofsky performance status (KPS) improvement rate [risk ratio (RR) = 1.96, 95% CI (1.38, 2.79)]; and decrease the incidence of leucopenia and nausea and vomiting in CRC. 3) For advanced stage, HFGMR can significantly improve the objective response rate (ORR) [RR = 1.35, 95% CI (1.19~1.53)], disease control rate (DCR) [RR = 1.14, 95% CI (1.05~1.23)], and KPS improvement rate [RR = 1.56, 95% CI (1.17, 2.09)] and decrease the incidence of leucopenia, neutropenia, anemia, nausea and vomiting, diarrhea, and fatigue in GC. There were no significant differences in ORR [RR = 1.32, 95% CI (0.94~1.86)] and DCR [RR = 1.22, 95% CI (0.99~1.50)], but they can improve the KPS response rate [RR = 1.62, 95% CI (1.13, 2.32)] and decrease the incidence of myelosuppression, nausea and vomiting, diarrhea, and hepatic and renal dysfunction in CRC.ConclusionThis study indicates that herbal formulas that could regulate the composition and proportion of gut microbiota have a positive effect in three stages (perioperative, postoperative, and advanced) of GC and CRC. They could promote the recovery of postoperative gastrointestinal function, increase tumor response, improve performance status, and reduce the incidence of adverse events. Herbal formulas exerted anti-cancer efficacy through multiple mechanisms and pathways; among them, the regulation of gut microbiota has not been paid enough attention. To further support the conclusion and better understand the role of gut microbiota in the treatment of GC and CRC, more rigorously designed, large-scale, and multicenter RCTs that focus on herbal formulas and gut microbiota are needed in the future.