Abstract Background: Myocardial infarction (MI) induces high morbidity all over the world. Patients with MI are more vulnerable to depression, and depression worsens their prognosis. Inflammatory response is the primary pathophysiological mechanism of MI combined with depression. Therefore, MI and depression would benefit from attenuating inflammation. Objectives: To explore the anti-inflammation effect in relieving heart dysfunction and depressive behaviors of mice under MI and chronic stress. Materials and Methods: A total of 40 male C57BL/6J mice were given sham or MI surgery, and the success rate of the surgery was 80%. Hence, 32 mice survived surgery and were distributed as 8 in each group of study. Then, unpredictable chronic mild stress (UCMS) or Anshen Buxin Liuwei pills (ABL pills) group were applied to some MI mice, and the mice were divided into different groups, including sham group, MI group, MI + UCMS group, and MI + UCMS + ABL pills group (n = 8). After a 2-week treatment, the mice underwent the sucrose preference test, and echocardiography before sacrifice. Then, the mice were sacrificed for pathological detection and inflammatory cytokines detection. Results: Compared with mice in the sham group, those mice had lower left ventricular ejection fraction (LVEF) (51.25 ± 9.92 vs. 12.18 ± 8.46, 20.95 ± 16.40, 29.55 ± 13.33%, P< 0.05) and left ventricular fractional shortening (LVFS) (21.12 ± 6.82 vs. 5.57 ± 4.0, 9.89 ± 8.03, 14.0 ± 6.65%, P< 0.05) in the MI, MI + UCMS, and MI + UCMS + ABL pills groups. ABL pills could reverse cardiac dysfunction for the significant elevation of LVEF and LVFS. The hematoxylin and eosin staining presented left ventricular (LV) enlargement, inflammatory cell infiltration, and myocardial fibrosis formation in MI and MI + UCMS mice. While ABL pills reversed the pathological changes induced by ligation of the left anterior descending. The enzyme-linked immunosorbent assay detection showed that MI and MI + UCMS elevated the concentrations of cardiac tumor necrosis factor-α (TNF-α) and tumor necrosis factor receptor 1 (TNFR1), which were reduced by ABL pills. ABL pills significantly reversed the depressive behaviors of mice with MI + UCMS (82.97 ± 3.04 vs. 76.07 ± 7.84%, P< 0.05). MI + UCMS group had a higher level of cortex TNFR1 than sham and MI, while ABL pills reversed the elevation (P > 0.05). Conclusions: Anti-inflammation treatment effectively improves cardiac function and depressive behaviors via inhibiting TNF-α/TNFR1.