Understanding tumor heterogeneity and immune infiltrates within the tumor-immune microenvironment (TIME) is essential for the innovation of immunotherapies. Here, combining single-cell transcriptomics and chromatin accessibility sequencing, we profile the intratumor heterogeneity of malignant cells and immune properties of the TIME in primary central nervous system diffuse large B-cell lymphoma (PCNS DLBCL) patients. We demonstrate diverse malignant programs related to tumor-promoting pathways, cell cycle and B-cell immune response. By integrating data from independent systemic DLBCL and follicular lymphoma cohorts, we reveal a prosurvival program with aberrantly elevated RNA splicing activity that is uniquely associated with PCNS DLBCL. Moreover, a plasmablast-like program that recurs across PCNS/activated B-cell DLBCL predicts a worse prognosis. In addition, clonally expanded CD8 T cells in PCNS DLBCL undergo a transition from a pre-exhaustion-like state to exhaustion, and exhibit higher exhaustion signature scores than systemic DLBCL. Thus, our study sheds light on potential reasons for the poor prognosis of PCNS DLBCL patients, which will facilitate the development of targeted therapy.