An o-aminoheteroaryl alkynyl-containing compound has a structure represented by formula (I), and the compound of formula (I) has advantages of a high FGFR and RET double target inhibitory activity and a relatively low KDR activity, and the compound of formula (I) exhibits a strong inhibitory activity in a human lung cancer cell line NCI-H1581 and a gastric cancer cell line SNU16 as well as an RET-dependent sensitive cell line BaF3-CCDC6-Ret and a mutant thereof. Pharmacokinetic data shows that the o-aminoheteroaryl alkynyl-containing compound has druggability, and exhibits significant relevant inhibition of the growth of related tumors in a long-term animal model of drug efficacy and results in favorable animal condition at effective doses.