An azaaryl derivative with the structure of formula (I), a preparation method therefor and a pharmaceutical use thereof are disclosed in this application. The series of compounds of the this application can be widely applied in the preparation of drugs for treating cancer, tumor, autoimmune disease, metabolic disease or metastatic disease, particularly for treating ovarian cancer, pancreatic cancer, prostate cancer, breast cancer, cervical cancer, glioblastoma, multiple myeloma, metabolic disease, neurodegenerative disease, primary site tumor metastasis or osseous metastasis cancer, and are expected to be developed into a new generation of CSF-1R inhibitor drugs.