Disclosed are an imidazopyrazine compound, a preparation method therefor and use thereof. Specifically, disclosed are a compound having a structure as represented by formula (I), a pharmaceutically acceptable salt, a stereoisomer or a prodrug thereof, and use of the compound, the pharmaceutically acceptable salt, the stereoisomer or the prodrug thereof in the preparation of a medicament. The medicament is used for preventing and/or treating diseases and/or symptoms related to Bruton's tyrosine kinase overactivity in a subject. Further disclosed is use of the compound, the pharmaceutically acceptable salt, the stereoisomer or the prodrug thereof in the preparation of a formulation. The formulation is used for reducing or inhibiting the activity of the Bruton's tyrosine kinase in cells.