Myocardial infarction (MI) remains the leading cause of cardiovascular-associated mortality and morbidity. Improving the retention rate, survival and cardiomyocyte differentiation of mesenchymal stem cells (MSCs) is important in improving the treatment of patients with MI. In the present study, temperature-responsive chitosan hydrogel, an injectable scaffold, was used to deliver MSCs directly into the infarcted myocardium of rats following MI. Histopathology and immunohistochemical staining were used to evaluate cardiac cell survival and regeneration, and cardiac function was assessed using an echocardiograph. It was demonstrated that chitosan hydrogel increased graft size and cell retention in the ischemic heart, promoted MSCs to differentiate into cardiomyocytes and increased the effects of MSCs on neovasculature formation. Furthermore, chitosan hydrogel enhanced the effect of MSCs on the improvement of cardiac function and hemodynamics in the infarcted area of rats following MI. These findings suggest that chitosan hydrogel is an appropriate material to deliver MSCs into infarcted myocardium.