Collectively, our results revealed that gut dysbiosis induces the development of depression-like behaviors through abnormal synapse pruning in microglia-mediated by complement C3, and the inhibition of abnormal synaptic pruning is the key to targeting microbes to treat depression. Here, C3 is linked to depressive disorder.