Immunotherapy with PD-1 checkpoint blockade is effective in only a minority of patients with cancer, suggesting that additional treatment strategies are needed. Here we use a pooled in vivo genetic screening approach using CRISPR-Cas9 genome editing in transplantable tumours in mice treated with immunotherapy to discover previously undescribed immunotherapy targets. We tested 2,368 genes expressed by melanoma cells to identify those that synergize with or cause resistance to checkpoint blockade. We recovered the known immune evasion molecules PD-L1 and CD47, and confirmed that defects in interferon-γ signalling caused resistance to immunotherapy. Tumours were sensitized to immunotherapy by deletion of genes involved in several diverse pathways, including NF-κB signalling, antigen presentation and the unfolded protein response. In addition, deletion of the protein tyrosine phosphatase PTPN2 in tumour cells increased the efficacy of immunotherapy by enhancing interferon-γ-mediated effects on antigen presentation and growth suppression. In vivo genetic screens in tumour models can identify new immunotherapy targets in unanticipated pathways.