YangxinDingji Capsule (YXDJ), derived from the classical Zhigancao Decoction, is widely applied in clinical practice to treat arrhythmias, alleviate myocardial injury, and protect cardiac function; however, its underlying protective mechanism remains unclear. In this study, we investigated the mechanisms underlying the cardioprotective effects of YXDJ using an integrative approach that combined metabolomics and network pharmacology. A rat model of arrhythmia was established using isoproterenol (ISO) induction. The concentrations of five core components in YXDJ, namely Liquiritigenin, Liquiritin, Rhmannioside D, Ginsenoside Re, and Ginsenoside Rg1, were quantified using HPLC-MS/MS. Metabolomic analysis based on UPLC-Q-Exactive-Orbitrap-MS was performed to identify key differential metabolites and their associated pathways. Potential targets of YXDJ core components were predicted through network pharmacology, molecular docking, and molecular dynamics simulations, and subsequently validated in vivo. The results demonstrated that the five core components of YXDJ exhibited excellent linearity within their respective concentration ranges (R2 ≥ 0.9992), along with good stability, repeatability, and recovery. Metabolomic analysis indicated that YXDJ exerted cardioprotective effects by modulating differential metabolites such as 1-Methylhistidine, sphinganine, and phytosphingosine, and by participating in pathways including Histidine metabolism and Sphingolipid metabolism. Network pharmacology, molecular docking, and molecular dynamics simulations further identified two stable complexes with high binding affinities, namely Liquiritin-SRC and Liquiritin-PTGS2. Consistently, in vivo experiments confirmed that YXDJ alleviated arrhythmia-induced myocardial injury through SRC and PTGS2, thereby exerting significant cardioprotective effects. This study suggests that the core components of YXDJ, exemplified by liquiritigenin, exert cardioprotective effects against arrhythmias by modulating SRC, PTGS2, and associated metabolic profiles. This offers new insights and a scientific basis for studying YXDJ's mechanism of action and its clinical application.