The present invention disclosed a class of thiazole compounds of general formula (I) and the preparation method and use thereof. More particularly, The present invention disclosed a derivative of natural product largazole, the preparation method thereof and the use in the field of antitumor and multiple sclerosis treatment as a histone deacetylase inhibitor.