Viral infection during pregnancy is correlated with increased frequency of neurodevelopmental disorders, and this is studied in mice prenatally subjected to maternal immune activation (MIA). We previously showed that maternal T helper 17 cells promote the development of cortical and behavioural abnormalities in MIA-affected offspring. Here we show that cortical abnormalities are preferentially localized to a region encompassing the dysgranular zone of the primary somatosensory cortex (S1DZ). Moreover, activation of pyramidal neurons in this cortical region was sufficient to induce MIA-associated behavioural phenotypes in wild-type animals, whereas reduction in neural activity rescued the behavioural abnormalities in MIA-affected offspring. Sociability and repetitive behavioural phenotypes could be selectively modulated according to the efferent targets of S1DZ. Our work identifies a cortical region primarily, if not exclusively, centred on the S1DZ as the major node of a neural network that mediates behavioural abnormalities observed in offspring exposed to maternal inflammation.