[Problem] A compound which is useful as a dopamine D1 receptor positive allosteric modulator (D1 PAM) is provided. [Means for Solution] The present inventors have studied a compound which has a dopamine D1 receptor positive allosteric modulating activity and is useful as an active ingredient of a pharmaceutical composition for preventing and/or treating cognitive impairment, negative symptoms of schizophrenia, Parkinsons disease, Alzheimers disease, Huntingtons disease, drug addictions, or the like, and they have thus found that a heterocyclic acetamide compound has a dopamine D1 receptor positive allosteric modulating activity, thereby completing the present invention. The heterocyclic acetamide compound of the present invention has a dopamine D1 receptor positive allosteric modulating activity and can be used as an agent for preventing and/or treating cognitive impairment, negative symptoms of schizophrenia, Parkinsons disease, Alzheimers disease, Huntingtons disease, drug addictions, or the like.