The Mediator complex regulates gene transcription by linking basal transcriptional machinery with DNA-bound transcription factors. The activity of the Mediator complex is mainly controlled by a kinase submodule that is comprised of four proteins, including MED12. Although ubiquitously expressed, Mediator subunits can differentially regulate gene expression in a tissue-specific manner. Here, we report that MED12 is required for normal cardiac function such that mice with conditional cardiac-specific deletion of MED12 display progressive dilated cardiomyopathy. Loss of MED12 perturbs expression of calcium handling genes in the heart, consequently altering calcium cycling in cardiomyocytes and disrupting cardiac electrical activity. We identified transcription factors that regulate expression of calcium-handling genes that are downregulated in the heart in the absence of MED12, and found that MED12 localizes to transcription factor consensus sequences within calcium handling genes. We showed that MED12 interacts with one such transcription factor, MEF2, in cardiomyocytes, and that MED12 and MEF2 co-occupy promoters of calcium handling genes. Furthermore, we demonstrated that MED12 enhances MEF2 transcriptional activity and overexpression of both increases expression of calcium handling genes in cardiomyocytes. Our data support a role for MED12 as a coordinator of transcription through MEF2 and other transcription factors. We conclude that MED12 is a regulator of a network of calcium handling genes, consequently “mediating” contractility in the mammalian heart. Overall design: Ventricle mRNA profiles of 1-day old control (CTL, CreNEG) and cardiac-specific Med12 knockout mice (Med12cKO, CrePOS) were generated by deep sequencing, in triplicate, using Illumina.