Cordyceps sinensis, including Hirsutella sinensis, is a highly valuable traditional Chinese medicine and is used to treat patients with pulmonary heart disease in clinical practice. However, the underlying mechanisms of its effects remain unclear. In this study, a mouse model of heart failure established by non-thoracic, transverse aortic constriction (TAC) was developed to determine the underlying mechanisms of therapeutic effects of Hirsutella sinensis fungus (HSF) powder. The results showed that HSF treatment remarkably ameliorated myocardial hypertrophy, collagen fiber hyperplasia, and cardiac function in mice with heart failure. Using transcriptional and epigenetic analyses, we found that the mechanism of HSF mainly involved a variety of signaling pathways related to myocardial fibrosis and determined that HSF could reduce the levels of TGF-β1 proteins in heart tissue, as well as type I and III collagen levels. These data suggest that HSF alleviates heart failure, inhibits irreversible ventricular remodeling, and improves cardiac function through the regulation of myocardial fibrosis-related signaling pathways, which can provide novel opportunities to improve heart failure therapy.