Nociception, a somatic discriminative aspect of pain, is, like touch, represented in the primary somatosensory cortex (S1), but the separation and interaction of the two modalities within S1 remain unclear. Here, we show spatially distinct tactile and nociceptive processing in the granular barrel field (BF) and adjacent dysgranular region (Dys) in mouse S1. Simultaneous recordings of the multiunit activity across subregions revealed that Dys neurons are more responsive to noxious input, whereas BF neurons prefer tactile input. At the single neuron level, nociceptive information is represented separately from the tactile information in Dys layer 2/3. In contrast, both modalities seem to converge on individual layer 5 neurons of each region, but to a different extent. Overall, these findings show layer-specific processing of nociceptive and tactile information between Dys and BF. We further demonstrated that Dys activity, but not BF activity, is critically involved in pain-like behavior. These findings provide new insights into the role of pain processing in S1.