Provided is a polycyclic inhibitor of anaplastic lymphoma kinase as represented by Formula (I), or a pharmaceutically acceptable salt or stereoisomer thereof, wherein R1, R2, R3, R4, and ring A are as defined in the description. The invention also relates to a method for preparing the compound, a pharmaceutical preparation and a pharmaceutical composition comprising the compound, and use of the compound, the pharmaceutically acceptable salt or stereoisomer thereof in manufacture of a medicament for the treatment and/or prevention of an anaplastic lymphoma kinase-mediated cancer or non-cancer related diseases.