Z-disks, the mechanical integration sites of heart and skeletal muscle cells, link anchorage of myofilaments to force reception and processing. The key molecules that enable the Z-disk to persistently withstand the extreme mechanical forces during muscle contraction have not yet been identified. Here we isolated nexilin (encoded by NEXN) as a novel Z-disk protein. Loss of nexilin in zebrafish led to perturbed Z-disk stability and heart failure. To evaluate the role of nexilin in human heart failure, we performed a genetic association study on individuals with dilated cardiomyopathy and found several mutations in NEXN associated with the disease. Nexilin mutation carriers showed the same cardiac Z-disk pathology as observed in nexilin-deficient zebrafish. Expression in zebrafish of nexilin proteins encoded by NEXN mutant alleles induced Z-disk damage and heart failure, demonstrating a dominant-negative effect and confirming the disease-causing nature of these mutations. Increasing mechanical strain aggravated Z-disk damage in nexilin-deficient skeletal muscle, implying a unique role of nexilin in protecting Z-disks from mechanical trauma.