During development, thalamocortical (TC) input has a critical role in the spatial delineation and patterning of cortical areas, yet the underlying cellular and molecular mechanisms that drive cortical neuron differentiation are poorly understood. In the primary (S1) and secondary (S2) somatosensory cortex, layer 4 (L4) neurons receive mutually exclusive input originating from two thalamic nuclei: the ventrobasalis (VB), which conveys tactile input, and the posterior nucleus (Po), which conveys modulatory and nociceptive input. Recently, we have shown that L4 neuron identity is not fully committed postnatally, implying a capacity for TC input to influence differentiation during cortical circuit assembly. Here we investigate whether the cell-type-specific molecular and functional identity of L4 neurons is instructed by the origin of their TC input. Genetic ablation of the VB at birth resulted in an anatomical and functional rewiring of Po projections onto L4 neurons in S1. This induced acquisition of Po input led to a respecification of postsynaptic L4 neurons, which developed functional molecular features of Po-target neurons while repressing VB-target traits. Respecified L4 neurons were able to respond both to touch and to noxious stimuli, in sharp contrast to the normal segregation of these sensory modalities in distinct cortical circuits. These findings reveal a behaviourally relevant TC-input-type-specific control over the molecular and functional differentiation of postsynaptic L4 neurons and cognate intracortical circuits, which instructs the development of modality-specific neuronal and circuit properties during corticogenesis.