Background: Glioma is a lethal intracranial tumor, and inflammation plays an important role in the initiation and development of glioma. Hence, there is an urgent need to conduct a bioinformatics analysis of immune-related genes (IRGs) for glioma. The present study aims to explore the association of the risk score with clinical outcomes and predict the prognosis with glioma. Methods: In The Cancer Genome Atlas (TCGA) database, 462 low grade glioma (LGG) samples and 166 glioblastoma (GBM) samples were reviewed, and IRGs correlated with the prognosis were selected by performing a survival analysis and establishing a Cox regression model. The potential molecular mechanism of these IRGs were also explored with assistance of computational biology. The risk score based on seven survival-associated IRGs was determined with the help of the multivariable Cox analysis, the patients were divided into two subgroups according to their risk score. Results: It was found that these differentially expressed IRGs were involved with the cytokine-cytokine receptor through functional enrichment analysis. The risk score based on the seven IRGs (SSTR5、CXCL10、CCL13、SAA1、CCL21、CCL27 and HTR1A) performed well in predicting patient’s the overall survival (OS), and correlated with age, 1p/19q codeletion status, IDH status, and WHO grades, both in the training (TCGA) datasets and the validation ((Chinese Glioma Genome Atlas) CGGA) datasets. The risk score also could reflect infiltration through several types of immune cells. Conclusions: This present study screened some IRGs associated with the patient’s clinical characteristic and prognosis, connect to the immune repertoire, demonstrated the importance of the risk score as a promising biomarker for estimating the clinical prognosis of glioma.