The present invention provides a kind of heterocyclic pyrimidinium derivatives for having and adjusting EGF-R ELISA (EGFR) kinases and ALK kinase activity. More specifically, heterocyclic pyrimidinium derivative disclosed in the present invention can inhibit, adjust or adjust kinases receptors, various difference EGFR mutant or the activity of ALK can be especially selectively adjusted, the invention also discloses the pharmaceutical compositions for containing the heterocyclic pyrimidinium derivative, and the method by applying the heterocyclic pyrimidinium derivatives for treatment and protein kinase activity especially EGFR and/or ALK kinase activity related disease, including non-small cell lung cancer.