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 R1 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 CH2, CHF or CF2 and R1 represents a secondary amino group which may be substituted), and then allowing a dehydrating agent to act thereon.