ObjectiveTo explore the relationship between flavin-containing monooxygenases (FMOs) and peritoneal metastasis (PM) in gastric cancer (GC).Materials and methodsTIMER 2.0 was used to perform pan-cancer analysis and assess the correlation between the expression of FMOs and cancers. A dataset from The Cancer Genome Atlas (TCGA) was used to analyze the correlation between FMOs and clinicopathological features of GC. PM is well established as the most common mode of metastasis in GC. To further analyze the correlation between FMOs and PM of GC, a dataset was obtained from the National Center for Biotechnology Information Gene Expression Omnibus (GEO) database. The results were validated by immunohistochemistry. The relationship between FMOs and PM of GC was explored, and a novel PM risk signature was constructed by least absolute shrinkage and selection operator (LASSO) regression analysis. The regression model’s validity was tested by multisampling. A nomogram was established based on the model for predicting PM in GC patients. The mechanism of FMOs in GC patients presenting with PM was assessed by conducting Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analyses in TCGA and GEO datasets. Finally, the potential relationship between FMOs and immunotherapy was analyzed.ResultsThe pan-cancer analysis in TCGA and GEO datasets showed that FMO1 was upregulated, while FMO2 and FMO4 were downregulated in GC. Moreover, FMO1 and FMO2 correlated positively with the T and N stage of GC in the TCGA dataset. FMO1 and FMO2 expression was a risk factor for GC (hazard ratio: 1.112 and 1.185). The overexpression of FMO1 was significantly correlated with worse disease-free-survival (DFS) and overall survival (OS). However, no relationship was found between FMO2 expression in GC and DFS and OS. PM was highly prevalent among GC patients and typically associated with a worse prognosis. FMO1 was highly expressed in GC with PM. FMO1 and FMO2 were positively correlated with PM in GC. We identified a 12-gene panel for predicting the PM risk signature by LASSO (Area Under Curve (AUC) = 0.948, 95%CI: 0.896–1.000). A 10-gene panel for PM prediction was identified (AUC = 0.932, 95%CI: 0.874–0.990), comprising FMO1 and FMO2. To establish a model for clinical application, a 7-gene panel was established (AUC = 0.927, 95% CI: 0.877–0.977) and successfully validated by multisampling. (AUC = 0.892, 95% CI: 0.878–0.906). GO and KEGG analyses suggest that FMO1 and FMO2 regulate the extracellular matrix and cell adhesion. FMO1 and FMO2 were positively correlated with the immune score of GC, and their expression was associated with the infiltration of immune cells.ConclusionPM in GC is strongly correlated with FMOs. Overall, FMO1 and FMO2 have huge prospects for application as novel diagnostic and therapeutic targets.