Panax ginseng is reputed to be capable of replenishing healthy Qi and bolstering physical strength, and P. notoginseng can resolve blood stasis and alleviate pain. P. ginseng and P. notoginseng are frequently employed to treat ischemic heart diseases caused by blockages in the heart vessels. Mitochondrial dysfunction often coexists with abnormal mitochondrial morphology, and mitochondrial plasticity and dynamics play key roles in cardiovascular diseases. In this study, primary neonatal rat cardiomyocytes were exposed to 4 hours of hypoxia(H) followed by 2 hours of reoxygenation(R). MitoTracker Deep Red and Hoechst 33342 were used to label mitochondria and nuclei, respectively. Fluorescence images were then acquired using ImageXpress Micro Confocal. Automated image processing and parameter extraction/calculation were carried out using ImagePro Plus. Subsequently, representative parameters were selected as indicators to assess alterations in mitochondrial morphology and function. The active compounds of P. ginseng and P. notoginseng were screened out and identified based on the UPLC-Triple-TOF-MS results and mitochondrial morphometric parameters. The findings demonstrated that RS-2, RS-4, SQ-1, and SQ-4 significantly increased the values of three key morphometric parameters, including mitochondrial length, branching, and area, which might contribute to rescuing morphological features of myocardial cells damaged by H/R injury. Among the active components of the two medicinal herbs, 20(R)-ginsenoside Rg_3, ginsenoside Re, and gypenoside ⅩⅦ exhibited the strongest protective effects on mitochondria in cardiomyocytes. Specifically, 20(R)-ginsenoside Rg_3 might upregulate expression of optic atrophy 1(OPA1) and mitofusin 2(MFN2), and ginsenoside Re and gypenoside ⅩⅦ might selectively upregulate OPA1 expression. Collectively, they promoted mitochondrial membrane fusion and mitigated mitochondrial damage, thereby exerting protective effects on cardiomyocytes. This study provides experimental support for the discovery of novel therapeutic agents for myocardial ischemia-reperfusion injury from P. ginseng and P. notoginseng and offers a novel approach for large-scale screening of bioactive compounds with cardioprotective effects from traditional Chinese medicines.