Myocardial ischemia-reperfusion (I/R) injury is a significant area of focus in cardiovascular disease research. I/R injury can increase intracellular oxidative stress, leading to DNA damage. H2AX plays a crucial role in DNA repair. This study utilized mouse and cell models of myocardial I/R to investigate the impact of H2AX on cardiomyocytes during I/R. This study initially assessed the expression of H2AX in MI/R mice compared to a sham surgery group. Subsequently, cardiac function, infarct area, and mitochondrial damage were evaluated after inhibiting H2AX in MI/R mice and a negative control group. Furthermore, the study delved into the molecular mechanisms by analyzing the expression of H2AX, P53, p-JNK, SHP2, p-SHP2, p-RAS, parkin, Drp1, Cyt-C, Caspase-3, and Caspase-8 in cardiomyocytes following the addition of JNK or P53 agonists. The results from western blotting in vivo indicated significantly higher H2AX expression in the MI/R group compared to the sham group. Inhibiting H2AX improved cardiac function, reduced myocardial infarct area, and mitigated mitochondrial damage in the MI/R group. In vitro experiments demonstrated that inhibiting H2AX could attenuate mitochondrial damage and apoptosis in myocardial cells by modulating the P53 and JNK signaling pathways. These findings suggested that inhibiting H2AX may alleviate myocardial I/R injury through the regulation of the P53/JNK pathway, highlighting H2AX as a potential target for the treatment of myocardial ischemia/reperfusion injury.