Glioma is the most common malignant tumor in the central nervous system. Evidence shows that clinical efficacy of immunotherapy is closely related to the tumor microenvironment. This study aims to establish a microenvironment-related genes (MRGs) model to predict the prognosis of patients with Grade II/III gliomas. Gene expression profile and clinical data of 459 patients with Grade II/III gliomas were extracted from The Cancer Genome Atlas. Then according to the immune/stromal scores generated by the ESTIMATE algorithm, the patients were scored one by one. Weighted gene co-expression network analysis (WGCNA) was used to construct a gene co-expression network to identify potential biomarkers for predicting the prognosis of patients. When adjusting clinical features including age, histology, grading, IDH status, we found that these features were independently associated with survival. The predicted value of the prognostic model was then verified in 440 samples in CGGA part B dataset and 182 samples in CGGA part C dataset by univariate and multivariate cox analysis. The clinical samples of 10 patients further confirmed our signature. Our findings suggested the eight-MRGs signature identified in this study are valuable prognostic predictors for patients with Grade II/III glioma.