Gastric cancer (GC), particularly for advanced stage of GC, commonly undergoes peritoneal metastasis (PM), which is the leading cause of GC-related death. However, there currently has no reliable biomarker to predict the onset of GCPM. It is well known that the imbalance of gut microbiota contributes to the development and metastasis of gastrointestinal tumors. Unfortunately, little is known about how the alternation in gut microbiota is associated with the onset of GCPM. Our current study analyzed structural characteristics and functional prediction of gut microbiota in GC patients with PM (PM group) and without PM (non-PM group). Fresh fecal samples were collected from a discovery cohort (PM = 38, non-PM = 54) and a validation cohort (PM = 15, non-PM = 21) of GC patients and their 16S ribosomal RNA (16s rRNA) gene amplicons were sequenced, followed by bioinformatics. The results indicated an increase in the biodiversity of gut microbiota in the non-PM group of the discovery cohort, compared with the PM group. Moreover, LEfSe analysis found 31 significantly different microorganisms, of which the Roseburia ranked the fifth in the random forest (RF) model. The characteristics of intestinal microbiota in GCPM patients were changed, and the abundance of Roseburia in gut microbiota from the GCPM patients was reduced and receiver operating characteristic (ROC) analysis revealed that the reduced abundance of gut Roseburia effectively predicted the onset of GCPM. This signature was also observed in the validation cohort. Therefore, Roseburia is a protective microbial marker and the reduced abundance of Roseburia in gut microbiota may help early diagnosis of GCPM.