Over 50% of patients who survive neuroinvasive infection with West Nile virus (WNV) exhibit chronic cognitive sequelae1,2. Although thousands of cases of WNV-mediated memory dysfunction accrue annually3, the mechanisms responsible for these impairments are unknown. The classical complement cascade, a key component of innate immune pathogen defence, mediates synaptic pruning by microglia during early postnatal development4,5. Here we show that viral infection of adult hippocampal neurons induces complement-mediated elimination of presynaptic terminals in a murine WNV neuroinvasive disease model. Inoculation of WNV-NS5-E218A, a WNV with a mutant NS5(E218A) protein6,7leads to survival rates and cognitive dysfunction that mirror human WNV neuroinvasive disease. WNV-NS5-E218A-recovered mice (recovery defined as survival after acute infection) display impaired spatial learning and persistence of phagocytic microglia without loss of hippocampal neurons or volume. Hippocampi from WNV-NS5-E218A-recovered mice with poor spatial learning show increased expression of genes that drive synaptic remodelling by microglia via complement. C1QA was upregulated and localized to microglia, infected neurons and presynaptic terminals during WNV neuroinvasive disease. Murine and human WNV neuroinvasive disease post-mortem samples exhibit loss of hippocampal CA3 presynaptic terminals, and murine studies revealed microglial engulfment of presynaptic terminals during acute infection and after recovery. Mice with fewer microglia (Il34−/− mice with a deficiency in IL-34 production) or deficiency in complement C3 or C3a receptor were protected from WNV-induced synaptic terminal loss. Our study provides a new murine model of WNV-induced spatial memory impairment, and identifies a potential mechanism underlying neurocognitive impairment in patients recovering from WNV neuroinvasive disease.