CD8+ T cell anergy is a critical driver of cancer immune evasion, but the underlying causes and mechanisms remain elusive. Here, the functional human endogenous retroviruses-K envelope (HERV-K Env) subunit transmembrane (K-TM) is identified as a potent viral immune checkpoint that induces CD8+ T cell anergy and elicits immune evasion in acute myeloid leukemia (AML) and pancreatic duct adenocarcinoma (PDAC).