Pain and itch are two closely related but essentially distinct sensations that elicit different behavioral responses. However, it remains mysterious how pain and itch information is encoded in the brain to produce differential perceptions. Here, we report that nociceptive and pruriceptive signals are separately represented and processed by distinct neural ensembles in the prelimbic (PL) subdivision of the medial prefrontal cortex (mPFC) in mice. Pain- and itch-responsive cortical neural ensembles were found to significantly differ in electrophysiological properties, input-output connectivity profiles, and activity patterns to nociceptive or pruriceptive stimuli. Moreover, these two groups of cortical neural ensembles oppositely modulate pain- or itch-related sensory and emotional behaviors through their preferential projections to specific downstream regions such as the mediodorsal thalamus (MD) and basolateral amygdala (BLA). These findings uncover separate representations of pain and itch by distinct prefrontal neural ensembles and provide a new framework for understanding somatosensory information processing in the brain.