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. This evidence concerns the gene C3 and major depressive disorder.