Although some biomarkers have been used to predict prognosis of lower-grade gliomas (LGGs), a pathway-related signature associated with immune response has not been developed. A key signaling pathway was determined according to the lowest adjusted p value among 50 hallmark pathways. The least absolute shrinkage and selection operator (LASSO) and stepwise multivariate Cox analyses were performed to construct a pathway-related gene signature. Somatic mutation, drug sensitivity and prediction of immunotherapy analyses were conducted to reveal the value of this signature in targeted therapies. In this study, an allograft rejection (AR) pathway was considered as a crucial signaling pathway, and we constructed an AR-related five-gene signature, which can independently predict the prognosis of LGGs. High-AR LGG patients had higher tumor mutation burden (TMB), Immunophenscore (IPS), IMmuno-PREdictive Score (IMPRES), T cell-inflamed gene expression profile (GEP) score and MHC I association immunoscore (MIAS) than low-AR patients. Most importantly, our signature can be validated in four immunotherapy cohorts. Furthermore, IC50 values of the six classic chemotherapeutic drugs were significantly elevated in the low-AR group compared with the high-AR group. This signature might be regarded as an underlying biomarker in predicting prognosis for LGGs, possibly providing more therapeutic strategies for future clinical research.