Determining divergent metabolic requirements of T cells, and the viruses and tumours they fail to combat, could provide new therapeutic checkpoints. Inhibition of acyl-CoA:cholesterol acyltransferase (ACAT) has direct anti-carcinogenic activity. Here, we show that ACAT inhibition has antiviral activity against hepatitis B (HBV), as well as boosting protective anti-HBV and anti-hepatocellular carcinoma (HCC) T cells. ACAT inhibition reduces CD8+ T cell neutral lipid droplets and promotes lipid microdomains, enhancing TCR signalling and TCR-independent bioenergetics. Dysfunctional HBV- and HCC-specific T cells are rescued by ACAT inhibitors directly ex vivo from human liver and tumour tissue respectively, including tissue-resident responses. ACAT inhibition enhances in vitro responsiveness of HBV-specific CD8+ T cells to PD-1 blockade and increases the functional avidity of TCR-gene-modified T cells. Finally, ACAT regulates HBV particle genesis in vitro, with inhibitors reducing both virions and subviral particles. Thus, ACAT inhibition provides a paradigm of a metabolic checkpoint able to constrain tumours and viruses but rescue exhausted T cells, rendering it an attractive therapeutic target for the functional cure of HBV and HBV-related HCC.