We further revealed the HBV infection had more effects on shaping immune compositions in tumor borders than in tumors, with the significant enrichment of HBV-specific PD-1+CD8+ tissue-resident memory T (TRM) cells in tumor borders of HBV+ patients. Here, PDCD1 is linked to neoplasm.