Pain is comprised of the sensory and affective components. Compared to the well-investigated mechanisms of the sensory pain, much less is known about the mechanisms underlying the affective pain. In recent years, accumulating evidence suggests that the anterior cingulate cortex (ACC) is a key structure for pain affection. To identify the molecules that may be involved in the affective component of pain, we have searched the Allen Brain Atlas expression database for genes whose expression is enriched in the ACC, and found that P311, an 8-kDa peptide, showed the strong expression in the ACC. P311 is also expressed in other areas associated with pain affection including the amygdala, insular cortex and thalamus. To understand the role of P311 in pain perception, we have examined the pain behaviors of the mice lacking P311. P311-/- mice showed normal heat and mechanical sensitivity, as well as normal formalin-induced inflammatory pain. In contrast, the formalin-induced avoidance behavior, which reflects pain-related negative emotion, was significantly attenuated in P311-/- mice relative to the control mice. These results suggest that P311 is involved in the affective, but not in the sensory component of pain. Our study thus provides the first evidence suggesting that the affective and sensory pain may be regulated by distinct molecular mechanisms.