To determine the overall tumor microenvironment (TME), characteristics, and transition mechanisms in primary central nervous system lymphoma (PCNSL), we performed spatial transcriptomics and matched the corresponding single-cell sequencing data of PCNSL patients. We found that tumor cells may achieve a “TME remodeling pattern” through an “immune pressure-sensing model”, in which they could choose to reshape the TME into a barrier environment or a cold environment according to the immune pressure. A keyFKBP5+tumor subgroup was found to be responsible for pushing tumors into the barrier environment, which provides a possible way to evaluate the stage of PCNSL. The specific mechanism of the TME remodeling pattern and the key molecules of the immune pressure-sensing model were identified through the spatial communication analysis. Finally, we discovered the spatial and temporal distributions and variation characteristics of immune checkpoint molecules and CAR-T target molecules in immunotherapy. These data clarified the TME remodeling pattern of PCNSL, provided a reference for its immunotherapy, and provided suggestions for the TME remodeling mechanism of other cancers.