Cardiomyocytes derived from human embryonic stem (hES) cells potentially offer large numbers of cells to facilitate repair of the infarcted heart. However, this approach has been limited by inefficient differentiation of hES cells into cardiomyocytes, insufficient purity of cardiomyocyte preparations and poor survival of hES cell-derived myocytes after transplantation. Seeking to overcome these challenges, we generated highly purified human cardiomyocytes using a readily scalable system for directed differentiation that relies on activin A and BMP4. We then identified a cocktail of pro-survival factors that limits cardiomyocyte death after transplantation. These techniques enabled consistent formation of myocardial grafts in the infarcted rat heart. The engrafted human myocardium attenuated ventricular dilation and preserved regional and global contractile function after myocardial infarction compared with controls receiving noncardiac hES cell derivatives or vehicle. The ability of hES cell-derived cardiomyocytes to partially remuscularize myocardial infarcts and attenuate heart failure encourages their study under conditions that closely match human disease.