In this study, an injectable, biodegradable hydrogel composite of oligo[poly(ethylene glycol) fumarate] (OPF) was investigated as a carrier of mouse embryonic stem cells (mESCs) for the treatment of myocardial infarction (MI). The OPF hydrogels were used to encapsulate mESCs. The cell differentiation in vitro over 14 days was determined via immunohistochemical examination. Then, mESCs encapsulated in OPF hydrogels were injected into the LV wall of a rat MI model. Detailed histological analysis and echocardiography were used to determine the structural and functional consequences after 4 weeks of transplantation. With ascorbic acid induction, mESCs could differentiate into cardiomyocytes and other cell types in all three lineages in the OPF hydrogel. After transplantation, both the 24-hr cell retention and 4-week graft size were significantly greater in the OPF + ESC group than that of the PBS + ESC group (P < 0.01). Four weeks after transplantation, OPF hydrogel alone significantly reduced the infarct size and collagen deposition and improved the cardiac function. The heart function and revascularization improved significantly, while the infarct size and fibrotic area decreased significantly in the OPF + ESC group compared with that of the PBS + ESC, OPF and PBS groups (P < 0.01). All treatments had significantly reduced MMP2 and MMP9 protein levels compared to the PBS control group, and the OPF + ESC group decreased most by Western blotting. Transplanted mESCs expressed cardiovascular markers. This study suggests the potential of a method for heart regeneration involving OPF hydrogels for stem cell encapsulation and transplantation.