We verified the protective effect of silencing EZH2 on depression rats through in vivo and in vitro models, and found that EZH2 played an important role in regulating microglia polarization. Here, EZH2 is linked to major depressive disorder.