When given prophylactically, anti-PD1 treatment led to an increase in the incidence of NASH–HCC and in the number and size of tumour nodules, which correlated with increased hepatic CD8+PD1+CXCR6+, TOX+, and TNF+ T cells. Here, TNF is linked to metabolic dysfunction-associated steatohepatitis.