The adult mammalian heart possesses little regenerative potential following injury. Fibrosis due to activation of cardiac fibroblasts impedes cardiac regeneration and contributes to loss of contractile function, pathological remodelling and susceptibility to arrhythmias. Cardiac fibroblasts account for a majority of cells in the heart and represent a potential cellular source for restoration of cardiac function following injury through phenotypic reprogramming to a myocardial cell fate. Here we show that four transcription factors, GATA4, HAND2, MEF2C and TBX5, can cooperatively reprogram adult mouse tail-tip and cardiac fibroblasts into beating cardiac-like myocytes in vitro. Forced expression of these factors in dividing non-cardiomyocytes in mice reprograms these cells into functional cardiac-like myocytes, improves cardiac function and reduces adverse ventricular remodelling following myocardial infarction. Our results suggest a strategy for cardiac repair through reprogramming fibroblasts resident in the heart with cardiogenic transcription factors or other molecules.