Gastrointestinal (GI) cancers constitute more than 33% of new cancer cases worldwide and pose a considerable burden on public health. There exists a growing body of evidence that has systematically recorded an upward trajectory in GI malignancies within the last 5 to 10 years, thus presenting a formidable menace to the health of the human population. The perturbations in GI microbiota may have a noteworthy influence on the advancement of GI cancers; however, the precise mechanisms behind this association are still not comprehensively understood. Some bacteria have been observed to support cancer development, while others seem to provide a safeguard against it. Recent studies have indicated that alterations in the composition and abundance of microbiomes could be associated with the progression of various GI cancers, such as colorectal, gastric, hepatic, and esophageal cancers. Within this comprehensive analysis, we examine the significance of microbiomes, particularly those located in the intestines, in GI cancers. Furthermore, we explore the impact of microbiomes on various treatment modalities for GI cancer, including chemotherapy, immunotherapy, and radiotherapy. Additionally, we delve into the intricate mechanisms through which intestinal microbes influence the efficacy of GI cancer treatments.