Complement overactivation mediates microglial synapse elimination in neurological diseases such as Alzheimer's disease (AD) and frontotemporal dementia (FTD), but how complement activity is regulated in the brain remains largely unknown. We identified that the secreted neuronal pentraxin Nptx2 binds complement C1q and thereby regulates its activity in the brain. Nptx2-deficient mice show increased complement activity, C1q-dependent microglial synapse engulfment, and loss of excitatory synapses. In a neuroinflammation culture model and in aged TauP301S mice, adeno-associated virus (AAV)-mediated neuronal overexpression of Nptx2 was sufficient to restrain complement activity and ameliorate microglia-mediated synapse loss. Analysis of human cerebrospinal fluid (CSF) samples from a genetic FTD cohort revealed reduced concentrations of Nptx2 and Nptx2-C1q protein complexes in symptomatic patients, which correlated with elevated C1q and activated C3. Together, these results show that Nptx2 regulates complement activity and microglial synapse elimination in the brain and that diminished Nptx2 concentrations might exacerbate complement-mediated neurodegeneration in patients with FTD.