Heart failure (HF) is a chronic condition that progressively worsens and continues to be a major financial burden and public health concern. The “gut-heart” axis provides an innovative perspective and therapeutic strategy for preventing and treating heart failure. Shenfu injection (SFI) is a Traditional Chinese Medicine-based treatment demonstrating potential as a therapeutic strategy for heart failure. However, the precise therapeutic mechanisms of SFI in heart failure are not completely characterized. In this study, HF models were established utilizing subcutaneous multipoint injection of isoproterenol (ISO) at a dosage of 5 mg kg−1·d−1 for 7 days. Serum levels of inflammatory biomarkers were quantified using protein microarrays. Rat feces were analyzed using untargeted metabolomics research and 16S rRNA sequencing. The link between gut microbiota and metabolites was examined using a MetOrigin and Spearman correlation analysis. Our results show that Shenfu injection effectively enhances cardiac function in rats with ISO-induced heart failure by potentially modulating pro-/anti-inflammatory imbalance and reducing serum and urine Trimethylamine-N-oxide (TMAO) levels. Moreover, SFI significantly increases the abundance of Bacteroidota at the phylum level, thereby improving disrupted gut microbiota composition. Additionally, SFI supplementation enriches specific genera known for their capacity to produce short-chain fatty acids. SFI was found to be associated with three key metabolic pathways, as revealed by fecal metabonomics analysis, including the pentose phosphate pathway, pyrimidine metabolism, and purine metabolism. Metabolite tracing analysis revealed that Taurine and hypotaurine metabolism was found to be specific to the microbial community. The biosynthesis of Pyrimidine metabolism, Purine metabolism, beta-alanine metabolism, Naphthalene degradation, Pantothenate, and CoA biosynthesis were identified as co-metabolic pathways between microbes and host. The Spearman correlation analysis was also significantly correlated to differentially expressed metabolites regulated by SFI and the gut microbiota. These results suggest that SFI improves ISO-induced heart failure by modulating co-metabolism and regulating the TMAO-inflammation axis.