We compared the immune compositions between HBV+ and HBV− HCC patients and found that PD-1+CD8+ tissue-resident memory T (TRM) cells were more highly associated with HBV infection, hepatic damage and fibrosis in tumor borders rather than in tumors. Here, CD8A is linked to neoplasm.