Myocardial Infarction (MI) is major cause of heart failure, highlighting the critical need for effective therapeutic strategies to improve cardiac repair. This study investigated the cardioprotective effects of VX765-coated polyethyleneimine (PEI)/sodium alginate (AG) composite nanogels (AG/PEI-VX765 NGs) in a rat model of MI. Additionally, AG-VX765 NGs and PEI-VX765 nanospheres (NPs) were synthesized and tested to compare their efficacy. MI was caused in rats by ligating the left anterior descending branch of the coronary artery, and the rats were grouped and set as Sham, MI, MI + VX765, MI + AG-VX765NGs, MI + PEI-VX765NPs, and MI + AG/PEI-VX765NGs. Results demonstrate that AG/PEI-VX765NGs were non-toxic and exhibited a sustained release of VX765. In vivo, experiments demonstrated that all treatment groups significantly enhanced cardiac function, reduced infarct size, fibrosis, and apoptosis in rats with MI, with the MI + AG/PEI-VX765NGs group exhibiting the most favorable outcomes. Our findings indicate that AG/PEI-VX765NGs represent a promising therapeutic approach for MI treatment.