The glioma immune microenvironment (GIM), consisting of glioma cells, stromal cells, and immune cells, accelerates the initiation, development, immune evasion, chemoresistance, and radioresistance of glioblastoma (GBM), whereas the immunosuppressive mechanisms of GBM have not been thoroughly elucidated to date. The glioma data downloaded from The Cancer Genome Atlas (TCGA) and the Chinese Glioma Genome Atlas (CGGA) databases were used to evaluate the composition of tumor-infiltrating immune cells (TICs) by the CIBERSORT algorithm. RNA-seq datasets from the TCGA and CGGA were used to analyze the relationship between immune scores with patients’ characteristics and TICs, which showed higher ratios of tumor-inhibiting/tumor-promoting signatures (M2/M1 macrophages) along with higher immune scores. The distribution of TICs among different glioma patients and the correlation with hazard ratio (HR) analysis suggested that M2 macrophages were abundant in malignant gliomas and indicated an unfavorable prognosis. We further analyzed TCGA cases with available mutation and copy-number alteration information, which showed that the status of PTEN could influence the immune microenvironment of glioma patients. Tissue microarrays of 39 GBM patients were carried out to confirm the clinical significance of PTEN and macrophage markers. We found that the high expression of PTEN was associated with a more extended survival period of glioma patients, positively correlated with M2 macrophages and negatively with M1 macrophages. Transwell and flow cytometry analyses demonstrated that PTEN status could prevent M1 to M2 polarization and M2 macrophage recruitment of gliomas in vitro. The newly discovered immunoregulatory activity of PTEN opens innovative avenues for investigations relevant to counteracting cancer development and progression.