Heterocyclic pyrimidine compounds that modulate mutant-selective epidermal growth factor receptor (EGFR) kinase activity are disclosed. Selectivity in inhibition of various mutant-EGFR is disclosed. Pharmaceutical compositions containing the pyrimidine derivatives, and methods of treating diseases associated with EGFR kinase activity comprising administration of the pyrimidine derivatives or pharmaceutical compositions containing the pyrimidine derivative, are described.