It is to provide a method for efficiently producing an aminoacetylpyrrolidinecarbonitrile derivative which is useful as a DPP-IV inhibitor. It is a method for producing an aminoacetylpyrrolidinecarbonitrile derivative represented by the formula (2): (in the formula, A and R 1 are as defined in the following), comprising allowing an acid to act on an aminoacetylpyrrolidinecarboxamide derivative represented by the formula (1): (in the formula, A represents CH 2 , CHF or CF 2 ; and R 1 represents a secondary amino group which may be substituted), and then allowing a dehydrating agent to act thereon.