Pyramidal neuron subtype diversity governs microglia states in the neocortex Jeffrey A Stogsdill1, Kwanho Kim2,3, Joshua Z Levin2,3, Paola Arlotta1,2,3*, 1Department of Stem Cell and Regenerative Biology, Harvard University; 2Stanley Center for Psychiatric Research, Broad Institute of MIT and Harvard, 3Klarman Cell Observatory, Broad Institute of MIT and Harvard Microglia are the resident macrophages of the brain that play critical roles in neural development and neuronal circuit function. During embryonic and postnatal development, microglia exist in multiple transcriptional states. However, it is still poorly understood how these states are established, and whether they are influenced by their cellular environment. We find that in the neocortex microglia laminar distribution is instructed by the neuronal class identity of local pyramidal neurons. By combining layer micro-dissections of the cortex with single-cell RNA sequencing of microglia, we unveil molecular signatures of distinct microglia states, and show that they can be grouped into layer-restricted or broadly-distributed states. Strikingly, conversion of lower-layer pyramidal neurons to an alternate class identity reconfigures both the density and transcriptional state of local layer-restricted microglia to correspond to the new neuronal niche, without affecting the broadly-distributed microglia. Lastly, harnessing the single cell transcriptomes of microglia and pyramidal neuron subtypes, we identify a host of cell-surface and secreted ligand-receptor pairs that may mediate unique and specific neuroimmune signaling within the neocortex. This bioinformatic ligand-receptor interactome analysis unmasks two modes of neuron-to-microglia communication: one driven by neuronal class identity, and one responsive by microglia state. Our findings highlight the fundamental role that neuronal identity and neuronal niches play in locally controlling the transcriptional status of postnatal microglia.