Multiple sclerosis (MS) is a demyelinating, autoimmune disease of the central nervous system. While work has focused on axon loss in MS, far less is known about synaptic changes. Here, in striking similarity to other neurodegenerative diseases, we identify in postmortem human MS tissue and in nonhuman primate and mouse MS models profound synapse loss and microglial synaptic engulfment. These events can occur independently of local demyelination, neuronal degeneration, and peripheral immune cell infiltration, but coincide with gliosis and increased localization of complement component C3, but not C1q, at synapses. Finally, we use AAV9 to overexpress the complement inhibitor Crry at activated C3-bound synapses in mice and demonstrate robust protection of synapses and visual function. These results mechanistically dissect synapse loss as an early pathology in MS. We further provide a novel gene therapy approach to prevent synapse loss by microglia, which may be broadly applicable to other neurodegenerative diseases.