The present invention provides a 4-aminoquinazoline derivative having the chemical structure of the following formula, and the use thereof. It is demonstrated by the pharmacological experiment that, the compound or a salt thereof according to the present invention not only has distinct inhibitory effect on histone deacetylases, but also has stronger differentiation induction and anti-proliferative activities for certain tumor cells. It can be used in the treatment of cancers and diseases related to cell differentiation and proliferation. Excellent efficacy is observed especially for leukemia and a solid tumor. As demonstrated by the animal test, the compound or a salt thereof according to the present invention is less toxic.