Inflammation is a key player in the regulation of depression. Shanzhiside methylester (SM) is an iridoid glycoside with strong anti-inflammatory properties. However, the antidepressant effect of SM remains unknown. The present study aimed to investigate whether SM protects against depression by targeting inflammation. A chronic unpredictable mild stress (CUMS)-induced mouse model of depression was established to assess the antidepressant effect of SM in vivo. In addition, an LPS plus ATP-induced cellular model of inflammation was used to explore the related inflammatory mechanism. We found that both SM and miRNA-155-5p sponge markedly remedied CUMS-induced depression-like behaviors in the sucrose preference test (SPT), tail suspension test (TST), and forced swim test (FST), accompanied by decreased Iba1 expression and the production of TNF-α, IL-1β, and IL-6. Moreover, SM and miRNA-155-5p sponge upregulated the protein levels of SOCS1 and downregulated the protein expression of p-JAK2 and p-STAT3 in the hippocampus of CUMS-exposed mice. miRNA-155-5p expression was also decreased following SM and miRNA-155-5p sponge administration. Furthermore, SM repressed LPS- and ATP-induced inflammatory responses in BV2 cells by regulating the SOCS1/JAK2/STAT3 signaling pathway, which was similar to the anti-inflammatory effects induced by the miRNA-155-5p sponge. Collectively, these findings suggested that SM exerted antidepressant actions by targeting the miRNA-155-5p/SOCS1 axis.