Methylation-related signatures play crucial roles in tumorigenesis and progression. However, their roles in the immune response in primary glioblastoma (GBM) remains unclear. We analyzed the differential expression of specific members of T cell exhaustion-related pathways in GBM from the perspective of T cell exhaustion. We further screened for significantly negatively correlated methylation sites as candidate methylation markers for T cell exhaustion. Using consensus clustering, we divided the samples into two categories with significant differences in overall survival (OS). We then performed univariate and multivariate Cox regression analyses to construct the T Cell Exhaustion Methylation (TEXM) signature. Finally, we confirmed that this signature served as an independent prognostic factor, and further characterized it in terms of drug resistance and immunotherapy. We identified 95 significantly differentially expressed T cell exhaustion-related genes and 51 methylation markers associated with T cell exhaustion. The cancer samples were classified according to methylation site markers, thus indicating two subtypes with significant differences in OS: subtype A and subtype B. Tumor scores, stromal scores, tumor purity, and ESTIMATE scores all showed significant differences between subtypes (P < 0.05). Univariate Cox regression analysis identified five methylation sites significantly associated with OS, and multivariate Cox regression analysis was used to construct the TEXM signature model by using these five methylation sites. Significant differences in OS were found between the groups with high and low TEXM signature scores, on the basis of calculation of the TEXM signature scores of tumor samples and using the median score to divide them into high and low score groups. Survival analysis revealed that the high score group had poorer OS and DFS than the low score group in the validation set. Notably, we observed a significant difference in drug sensitivity between the high and low TEXM signature score groups, with the high score group showing higher drug resistance and poorer prognosis. The tumor immune state, as predicted with Tracking Tumor Immunophenotype (TIP), revealed significant differences in antitumor immune scores between the high and low TEXM signature score groups. Finally, we identified 43 significantly differentially regulated metabolism-associated biological processes. The epigenetic methylation-related TEXM signature plays a key role in driving differential immune responses in GBM.