Microglia maintain homeostasis in the brain, but whether aberrant microglial activation can cause neurodegeneration remains controversial. Here, we use transcriptome profiling to demonstrate that deficiency in frontotemporal dementia (FTD) gene progranulin (Grn) leads to an age-dependent, progressive upregulation of lysosomal and innate immunity genes, increased complement production, and enhanced synaptic pruning in microglia. During aging, Grn(-/-) mice show profound microglia infiltration and preferential elimination of inhibitory synapses in the ventral thalamus, which lead to hyperexcitability in the thalamocortical circuits and obsessive-compulsive disorder (OCD)-like grooming behaviors. Remarkably, deleting C1qa gene significantly reduces synaptic pruning by Grn(-/-) microglia and mitigates neurodegeneration, behavioral phenotypes, and premature mortality in Grn(-/-) mice. Together, our results uncover a previously unrecognized role of progranulin in suppressing aberrant microglia activation during aging. These results represent an important conceptual advance that complement activation and microglia-mediated synaptic pruning are major drivers, rather than consequences, of neurodegeneration caused by progranulin deficiency.