The clinical efficacy of epidermal growth factor receptor (EGFR) kinase inhibitors in EGFR-mutant non-small-cell lung cancer (NSCLC) is limited by the development of drug-resistance mutations, including the gatekeeper T790M mutation. Strategies targeting EGFR T790M with irreversible inhibitors have had limited success and are associated with toxicity due to concurrent inhibition of wild-type EGFR. All current EGFR inhibitors possess a structurally related quinazoline-based core scaffold and were identified as ATP-competitive inhibitors of wild-type EGFR. Here we identify a covalent pyrimidine EGFR inhibitor by screening an irreversible kinase inhibitor library specifically against EGFR T790M. These agents are 30- to 100-fold more potent against EGFR T790M, and up to 100-fold less potent against wild-type EGFR, than quinazoline-based EGFR inhibitors in vitro. They are also effective in murine models of lung cancer driven by EGFR T790M. Co-crystallization studies reveal a structural basis for the increased potency and mutant selectivity of these agents. These mutant-selective irreversible EGFR kinase inhibitors may be clinically more effective and better tolerated than quinazoline-based inhibitors. Our findings demonstrate that functional pharmacological screens against clinically important mutant kinases represent a powerful strategy to identify new classes of mutant-selective kinase inhibitors.