The present invention relates to thienopyrimidine compound, preparation method thereof, pharmaceutical composition and use thereof, and in particular to a type of compounds having ALK and/or c-Met selective inhibitory activity, a method for the preparation thereof, a pharmaceutical composition comprising the same, and use of these compounds in the manufacture of a medicament for preventing or treating a disease associated with anaplastic lymphoma kinase in vivo, and in the manufacture of a medicament for preventing or treating a disease associated with angiogenesis or cancer metastasis, in particular in the manufacture of a medicament for preventing or treating tumor growth and metastasis.