The invention belongs to the technical field of biological medicine, and particularly relates to an angiotensin converting enzyme 2 inhibitor and application thereof and an anti-coronavirus infection. The angiotensin converting enzyme 2 inhibitor has the chemical structure shown in the general formula (I), R1 and R2 can be selected from hydrogen, halogen, amino, amido, hydroxyl, cyano, alkyl, naphthenic base and alkoxy, X is selected from hetero atoms such as N, O and S, and Y is selected from alkyl or acylamino. Through detection, the angiotensin converting enzyme 2 inhibitor has ACE2 inhibitory activity, can be used as a novel angiotensin converting enzyme 2 inhibitor, and has the potential of being applied to preparation of angiotensin converting enzyme 2 inhibitory drugs, especially anti-coronavirus infection drugs. (I).