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