Immunotherapies, in particular immune checkpoint blockade (ICB), have improved the clinical outcome of cancer patients, although many fail to mount a durable response. Several resistance mechanisms have been identified, but our understanding of the requirements for a robust ICB response is incomplete. We have engineered an MHC I/antigen: TCR-matched panel of human NSCLC cancer and T cells to identify tumor cell-intrinsic T cell resistance mechanisms. The top differentially expressed gene in resistant tumor cells was SERPINB9. This serine protease inhibitor of the effector T cell-derived molecule granzyme B prevents caspase-mediated tumor apoptosis. Concordantly, we show that genetic ablation of SERPINB9 reverts T cell resistance of NSCLC cell lines, whereas its overexpression reduces T cell sensitivity. SERPINB9 expression in NSCLC strongly correlates with a mesenchymal phenotype. We also find that SERPINB9 is commonly amplified in cancer, particularly melanoma in which it is indicative of poor prognosis. Single-cell RNA sequencing of ICB-treated melanomas revealed that SERPINB9 expression is elevated not only in cells from post- versus pre-treatment cancers, but also in ICB-refractory cancers. In NSCLC we commonly observed rare SERPINB9-positive cancer cells, possibly accounting for reservoirs of ICB-resistant cells. While underscoring SERPINB9 as a potential target to combat immunotherapy resistance, these results suggest its potential to serve as a prognostic and predictive biomarker.