Protein degradation in eukaryotes often requires the ubiquitin-selective chaperone p97 for substrate recruitment and ubiquitin-chain assembly. However, the physiological relevance of p97, and its role in developmental processes, remain unclear. Here, we discover an unanticipated function for CDC-48/p97 in myosin assembly and myofibril organization, both in Caenorhabditis elegans and humans. The developmentally regulated assembly of a CDC-48–UFD-2–CHN-1 complex links turnover of the myosin-directed chaperone UNC-45 to functional muscle formation. Our data suggest a similarly conserved pathway regulating myosin assembly in humans. Remarkably, mutations in human p97, known to cause hereditary inclusion-body myopathy, abrogate UNC-45 degradation and result in severely disorganized myofibrils, detrimental towards sarcomeric function. These results identify a key role for CDC-48/p97 in the process of myofibre differentiation and maintenance, which is abolished during pathological conditions leading to protein aggregation and inclusion-body formation in human skeletal muscle.