Microglia are the main immune cells in the brain and have roles in brain homeostasis and neurological diseases. Mechanisms underlying microglia-neuron communication remain elusive. Here, we identified an interaction site between neuronal cell bodies and microglial processes in mouse and human brain. Somatic microglia-neuron junctions have a specialized nanoarchitecture optimized for purinergic signaling. Activity of neuronal mitochondria was linked with microglial junction formation, which was induced rapidly in response to neuronal activation and blocked by inhibition of P2Y12 receptors. Brain injury-induced changes at somatic junctions triggered P2Y12 receptor-dependent microglial neuroprotection, regulating neuronal calcium load and functional connectivity. Thus, microglial processes at these junctions could potentially monitor and protect neuronal functions.