Purpose: Wolfiporia cocos is frequently used in traditional Chinese medicine to treat depression. However, antidepressant-like effects of the main active ingredients of Wolfiporia cocos, total triterpenes of Wolfiporia cocos (TTWC), are not well studied. This study aimed to investigate those effects and explore their specific mechanisms of action in depth. Methods: Chemical components of TTWC were analyzed using LC-MS. Depression-like behavior in rats were induced by chronic unpredictable mild stress (CUMS). The suppressive effects of TTWC (60, 120, 240 mg/kg) against CUMS-induced depression-like behavior were evaluated using the forced swimming test (FST), open field test (OFT) and sucrose preference test (SPT). Levels of 5-hydroxytryptamine (5-HT), glutamate (GLU), corticotropin-releasing hormone (CRH), interleukin-1 beta (IL-1beta), interleukin-18 (IL-18), interleukin-6 (IL-6), and tumor necrosis factor-alpha (TNF-alpha) in different groups were determined by ELISA. Western blotting (WB) was used to detect the expression of NLRP3, ASC, pro-caspase-1, caspase-1, pro-IL-1beta, IL-1beta, pro-IL-18, and IL-18 in the prefrontal cortex. Additionally, the mRNA levels of NLRP3, ASC, caspase-1, IL-1beta and IL-18 were detected by RT-PCR. Results: A total of 69 lanostane-type triterpene acids of TTWC were identified. The results showed that TTWC exhibited an antidepressant-like effect in CUMS rats, reversed the decreased sugar preference in the SPT, reduction of immobility time in the FST, reduced the rest time, increased the total moving distance in the OFT. TTWC increased 5-HT levels and decreased GLU levels in the hippocampus. Moreover, TTWC decreased CRH levels in serum, indicating the regulation of over-activation of the hypothalamic-pituitary-adrenal (HPA) axis. In addition, reduced serum levels of IL-1beta, IL-18, IL-6, and TNF-alpha. The WB results implied that TTWC inhibited the expression of NLRP3, ASC, caspase-1, IL-1beta, and IL-18 in the prefrontal cortex and enhanced the expression of pro-caspase-1, pro-IL-1beta, and pro-IL-18. Although most of the results were not significant, PCR results showed that TTWC inhibited the expression of NLRP3, ASC, caspase-1, IL-1beta, and IL-18 in the prefrontal cortex. Conclusion: TTWC treatment exerted an antidepressant-like effect and regulates neurotransmitters, HPA axis and NLRP3 signaling pathway. These results indicated the potential of TTWC in preventing the development of depression.