Recent brain imaging studies indicate that empathy for pain relies upon both the affective and/or the sensorimotor nodes of the pain matrix, and empathic neural responses are modulated by stimulus reality, personal experience, and affective link with others. The current work investigated whether and how empathic neural responses are modulated by emotional contexts in which painful stimulations are perceived. Using functional magnetic resonance imaging (fMRI), we first showed that perceiving a painful stimulation (needle penetration) applied to a face with neutral expression induced activation in the anterior cingulate cortex (ACC) relative to nonpainful stimulation (Q-tip touch). However, when observation of the painful stimuli delivered to a neutral face was intermixed with observation of painful or happy faces, the ACC activity decreased while the activity in the face area of the secondary somatosensory cortex increased to the painful stimulation. Moreover, the secondary somatosensory activity associated with the painful stimulation decreased when the painful stimulation was applied to faces with happy and painful expressions. The findings suggest that observing painful stimuli in an emotional context weakens affective responses but increases sensory responses to perceived pain and implies possible interactions between the affective and sensory components of the pain matrix during empathy for pain.