In the analysis of immune cell infiltration in gliomas, we found that M2 macrophages outnumbered M1 macrophages in the tumor microenvironment of gliomas in high-risk group, and the three ferroptosis-related risk genes, AURKA, HSPB1, and NNMT, significantly inhibited ferroptosis of glioblastoma cells and promoted the polarization of M1 macrophages to M2. The gene discussed is NNMT; the disease is central nervous system cancer.