Although adoptive T-cell therapy has shown remarkable clinical efficacy in haematological malignancies, its success in combating solid tumours has been limited. Here, we report that PTPN2 deletion in T cells enhances cancer immunosurveillance and the efficacy of adoptively transferred tumour-specific T cells. T-cell-specific PTPN2 deficiency prevented tumours forming in aged mice heterozygous for the tumour suppressor p53. Adoptive transfer of PTPN2-deficient CD8(+) T cells markedly repressed tumour formation in mice bearing mammary tumours. Moreover, PTPN2 deletion in T cells expressing a chimeric antigen receptor (CAR) specific for the oncoprotein HER-2 increased the activation of the Src family kinase LCK and cytokine-induced STAT-5 signalling, thereby enhancing both CAR T-cell activation and homing to CXCL9/10-expressing tumours to eradicate HER-2(+) mammary tumours in vivo. Our findings define PTPN2 as a target for bolstering T-cell-mediated anti-tumour immunity and CAR T-cell therapy against solid tumours.