Hematopoietic progenitor kinase 1 (HPK1) is a serine/threonine kinase that serves as the negative regulator of multiple immune signaling pathways. Genetic studies using HPK1 knockout and kinase-dead mice suggested that inhibiting HPK1 either alone or in combination with immune checkpoint blockade could be promising strategy in cancer immunotherapy. Herein, we report the design, synthesis and structure–activity relationship (SAR) study of a series of potent HPK1 inhibitors bearing quinazoline-2,5-diamine scaffold. Three rounds of SAR explorations led to the identification of 9h, the most potent compound in this series which harbors a 2-methyl-1,2,3,4-tetrahydroisoquinolin-7-yl substituent. Further biological studies using human immune cells demonstrated that 9h could strongly inhibit the downstream phosphorylation, augment the IL-2 secretion and reverse the PGE2-induced immune suppression. Overall, 9h can serve as a tool compound to help with demonstrating the pharmacological role of HPK1 kinase inhibition, and our investigation provided a reliable reference for the later development of HPK1 inhibitors.