The invention discloses a miazines compound, an EGFR inhibitor and application thereof. The miazines compound comprises a compound shown as formula I, or pharmaceutically acceptable salt, stereisomer, solvate or prodrug thereof; and the EGFR inhibitor contains the miazines compound. The miazines compound disclosed by the invention can inhibit the activation or resistant mutation of one or more EGFRs; the multiplication of EGFRT790M / L858R amphimutation enzyme can be inhibited under nanomole concentration, and the inhibition for wild type EGFR enzyme is relatively weak; the miazines compound can be used for the treatment of EGFR sensitive mutation cancers, and is also applicable for cases generating secondary drug resistance in current EGFR-TKI treatment; and moreover, the mutation selectivity greatly reduces toxic and side effects generated by the inhibition of the wild type EGFR, and the miazines compound is an ideal therapeutic drug for diseases caused by EGFR mutation.