We obtained HCC specimens, along with adjacent nontumor tissues and blood samples, from 90 patients who underwent surgical resection at Asan Medical Center (Seoul, Korea) from April 2016 through April 2018. Intrahepatic lymphocytes and tumor-infiltrating T cells were analyzed by flow cytometry. Tumor-infiltrating CD8+ T cells were sorted by flow cytometry into populations based on expression level of programmed cell death 1 (PDCD1 or PD1): PD1-high, PD1-intermediate, and PD1-negative. Sorted cells were analyzed by RNA sequencing. Proliferation and production of interferon gamma (IFNG) and tumor necrosis factor (TNF) by CD8+ T cells were measured in response to anti-CD3 and antibodies against immune checkpoint receptors including PD1, hepatitis A virus cellular receptor 2 (HAVCR2 or TIM3), lymphocyte activating 3 (LAG3), or isotype control. Tumor-associated antigen-specific CD8+ T cells were identified using HLA-A*0201 dextramers. PDL1 expression on tumor tissue was assessed by immunohistochemistry.