The present invention relates to the field of the drugs associated with the diabetes. Particularly, the present invention relates to a dipeptidyl peptidase-IV inhibitor having the structure shown by formula (I), which contains amide thiazole structure and has an effect on treating diabetes, and a preparation method and a pharmaceutical composition containing it, as well as use thereof in manufacture of the drugs for treating the diabetes,wherein, R1 is hydrogen, halogen, C1-C5 alkyl, COOR3 or phenyl, wherein R3 is C1-C5 alkyl R2 is phenyl, substituted phenyl, 2-furanyl, substituted 2-furanyl, 2-thienyl, substituted 2-thienyl, 2-pyrrolyl, or substituted 2-pyrrolyl.