Sepsis-associated encephalopathy (SAE) is a severe and frequent complication of sepsis causing delirium, coma, and long-term cognitive dysfunction. We identified microglia and C1q complement activation in hippocampal autopsy tissue of patients with sepsis and increased C1q-mediated synaptic pruning in a murine polymicrobial sepsis model. Unbiased transcriptomics of hippocampal tissue and isolated microglia derived from septic mice revealed an involvement of the innate immune system, complement activation, and up-regulation of lysosomal pathways during SAE in parallel to neuronal and synaptic damage. Microglial engulfment of C1q-tagged synapses could be prevented by stereotactic intrahippocampal injection of a specific C1q-blocking antibody. Pharmacologically targeting microglia by PLX5622, a CSF1-R inhibitor, reduced C1q levels and the number of C1q-tagged synapses, protected from neuronal damage and synapse loss, and improved neurocognitive outcome. Thus, we identified complement-dependent synaptic pruning by microglia as a crucial pathomechanism for the development of neuronal defects during SAE.