the present invention pertains to the field of pharmaceutical chemistry and discloses 8 -- 3 - exo - 8 - azabicyclooctane - 3 - amino amide compounds represented by formula i , the pharmaceutical compositions , the preparation method and the use thereof . such compounds or pharmaceutically acceptable salts thereof can be used as an antagonist of ccr5 in preparing medicaments for treating diseases mediated by ccr5 , particularly hiv infection , asthma , rheumatoid arthritis , autoimmune diseases and chronic obstructive pulmonary diseases .