Provided in the present invention is a hydroxamic acid compound containing quinolyl as shown in formula (I), at the same time also disclosed is the preparation method of the compound and the use thereof, and a drug containing the hydroxamic acid compound containing quinolyl. Such compounds are inhibitors of protein kinases and/or histone deacetylases, and can be used in the treatment of diseases caused by the abnormal activity of protein kinases and/or histone deacetylases, for example tumours, etc.