The aim of the present study was to reveal the potential molecular mechanisms of microsatellite instability (MSI) on the prognosis of gastric cancer (GC). The investigation was performed based on an RNAseq expression profiling dataset downloaded from The Cancer Genome Atlas, including 64 high-level MSI (MSI-H) GC samples, 44 low-level MSI (MSI-L) GC samples and 187 stable microsatellite (MSI-S) GC samples. Differentially expressed genes (DEGs) were identified between the MSI-H, MSI-L and MSI-S samples. Pathway enrichment analysis was performed for the identified DEGs and the pathway deviation scores of the significant enrichment pathways were calculated. A Multi-Layer Perceptron (MLP) classifier, based on the different pathways associated with the MSI statuses was constructed for predicting the outcome of patients with GC, which was validated in another independent dataset. A total of 190 DEGs were selected between the MSI-H, MSI-L and MSI-S samples. The MLP classifier was established based on the deviation scores of 10 significant pathways, among which antigen processing and presentation, and inflammatory bowel disease pathways were significantly enriched with HLA-DRB5, HLA-DMA, HLA-DQA1 and HLA-DRA; the measles, toxoplasmosis and herpes simplex infection pathways were significantly enriched with Janus kinase 2 (JAK2), caspase-8 (CASP8) and Fas. The classifier performed well on an independent validation set with 100 GC samples. Taken together, the results indicated that MSI status may affect GC prognosis, partly through the antigen processing and presentation, inflammatory bowel disease, measles, toxoplasmosis and herpes simplex infection pathways. HLA-DRB5, HLA-DMA, HLA-DQA1, HLA-DRA, JAK2, CASP8 and Fas may be predictive factors for prognosis in GC.