Immune dysfunction is commonly associated with several neurological and mental disorders. Although the mechanisms by which peripheral immunity may influence neuronal function are largely unknown, recent findings implicate meningeal immunity influencing behaviour, such as spatial learning and memory. Here we show that meningeal immunity is also critical for social behaviour; mice deficient in adaptive immunity exhibit social deficits and hyper-connectivity of fronto-cortical brain regions. Associations between rodent transcriptomes from brain and cellular transcriptomes in response to T-cell-derived cytokines suggest a strong interaction between social behaviour and interferon-γ (IFN-γ)-driven responses. Concordantly, we demonstrate that inhibitory neurons respond to IFN-γ and increase GABAergic (γ-aminobutyric-acid) currents in projection neurons, suggesting that IFN-γ is a molecular link between meningeal immunity and neural circuits recruited for social behaviour. Meta-analysis of the transcriptomes of a range of organisms reveals that rodents, fish, and flies elevate IFN-γ/JAK-STAT-dependent gene signatures in a social context, suggesting that the IFN-γ signalling pathway could mediate a co-evolutionary link between social/aggregation behaviour and an efficient anti-pathogen response. This study implicates adaptive immune dysfunction, in particular IFN-γ, in disorders characterized by social dysfunction and suggests a co-evolutionary link between social behaviour and an anti-pathogen immune response driven by IFN-γ signalling.