The present invention relates to six-membered ring benzo derivatives as a DPP-4 inhibitor and a use thereof. In particular, the present invention relates to a compound as shown by formula I, a pharmaceutical composition containing the compound of formula I and a use of the compound in the preparation of drugs for treating DPP-4 related diseases or inhibiting DPP-4.