In muscle cells, a complex network of Z-disc proteins allows proper reception, transduction and transmission of mechanical and biochemical signals. Mutations in genes encoding different Z-disc proteins such as integrin-linked kinase (ILK) and nexilin have recently been shown to cause heart failure by distinct mechanisms such as disturbed mechanosensing, altered mechanotransduction or mechanical Z-disc destabilization. We identified core-binding factor beta (CBF beta) as an essential component for maintaining sarcomeric Z-disc and myofilament organization in heart and skeletal muscle. In CBF beta-deficient cardiomyocytes and skeletal-muscle cells, myofilaments are thinned and Z-discs are misaligned, leading to progressive impairment of heart and skeletal-muscle function. Transcription of the gene encoding CBF beta mainly depends on JunB activity. In JunB-morphant zebrafish, which show a heart-failure phenotype similar to that of CBF beta-deficient zebrafish, transcript and protein levels of CBF beta are severely reduced. Accordingly, ectopic expression of CBF beta can reconstitute cardiomyocyte function and rescue heart failure in JunB morphants, demonstrating for the first time an essential role of JunB-CBF beta signaling for maintaining sarcomere architecture and function.