The present disclosure relates to 6-amino quinazoline or 3-cyano quinoline derivatives, preparation processes and pharmaceutical compositions containing them. Specifically, the present disclosure relates to novel 6-amino quinazoline or 3-cyano quinoline derivatives presented by formula (I), or its tautomer, enantiomer, diastereomer, racemate or pharmaceutically acceptable salts thereof, or metabolite, metabolic precursor or prodrug thereof, and the uses for treatment especially for protein kinase inhibitors, in which each substitute group of general formula (I) is as defined in the specification.本發明涉及6-胺基喹唑啉或3-氰基喹啉類衍生物、其製備方法及其在醫藥上的應用。具體而言,本發明涉及一種通式(I)所示新的6-胺基喹唑啉或3-氰基喹啉類衍生物,以及它們的互變異構體、對映體、非對映體、消旋體和可藥用的鹽,以及代謝產物和代謝前體或前藥,以及它們作為治療劑特別是作為蛋白激酶抑制劑的用途,其中通式(I)中的各取代基的定義與說明書中的定義相同。