Irreversible EGFR inhibitors can circumvent acquired resistance to first-generation reversible, ATP-competitive inhibitors in the treatment of non-small-cell lung cancer. They contain both a driver group, which assures target recognition, and a warhead, generally an acrylamide or propargylamide fragment that binds covalently to Cys797 within the kinase domain of EGFR. We performed a systematic exploration of the role for the warhead group, introducing different cysteine-trapping fragments at position 6 of a traditional 4-anilinoquinazoline scaffold. We found that different reactive groups, including epoxyamides (compounds 3-6) and phenoxyacetamides (compounds 7-9), were able to irreversibly inhibit EGFR. In particular, at significant lower concentrations than gefitinib (1), (2R,3R)-N-(4-(3-bromoanilino)quinazolin-6-yl)-3-(piperidin-1-ylmethyl)oxirane-2-carboxamide (6) inhibited EGFR autophosphorylation and downstream signaling pathways, suppressed proliferation, and induced apoptosis in gefitinib-resistant NSCLC H1975 cells, harboring the T790M mutation in EGFR.