Pain is a complex experience composed of sensory and affective components. Although the neural systems of the sensory component of pain have been studied extensively, those of its affective component remain to be determined. In the present study, we examined the effects of corticotropin-releasing factor (CRF) and neuropeptide Y (NPY) injected into the dorsolateral bed nucleus of the stria terminalis (dlBNST) on pain-induced aversion and nociceptive behaviors in rats to examine the roles of these peptides in affective and sensory components of pain, respectively. In vivo microdialysis showed that formalin-evoked pain enhanced the release of CRF in this brain region. Using a conditioned place aversion (CPA) test, we found that intra-dlBNST injection of a CRF1 or CRF2 receptor antagonist suppressed pain-induced aversion. Intra-dlBNST CRF injection induced CPA even in the absence of pain stimulation. On the other hand, intra-dlBNST NPY injection suppressed pain-induced aversion. Coadministration of NPY inhibited CRF-induced CPA. This inhibitory effect of NPY was blocked by coadministration of a Y1 or Y5 receptor antagonist. Furthermore, whole-cell patch-clamp electrophysiology in dlBNST slices revealed that CRF increased neuronal excitability specifically in type II dlBNST neurons, whereas NPY decreased it in these neurons. Excitatory effects of CRF on type II dlBNST neurons were suppressed by NPY. These results have uncovered some of the neuronal mechanisms underlying the affective component of pain by showing opposing roles of intra-dlBNST CRF and NPY in pain-induced aversion and opposing actions of these peptides on neuronal excitability converging on the same target, type II neurons, within the dlBNST.