Maintenance of skeletal muscle structure and function requires efficient and precise metabolic control. Autophagy plays a key role in metabolic homeostasis of diverse tissues by recycling cellular constituents, particularly under conditions of caloric restriction, thereby normalizing cellular metabolism. Here we show that histone deacetylases (HDACs) 1 and 2 control skeletal muscle homeostasis and autophagy flux in mice. Skeletal muscle-specific deletion of both HDAC1 and HDAC2 results in perinatal lethality of a subset of mice, accompanied by mitochondrial abnormalities and sarcomere degeneration. Mutant mice that survive the first day of life develop a progressive myopathy characterized by muscle degeneration and regeneration, and abnormal metabolism resulting from a blockade to autophagy. HDAC1 and HDAC2 regulate skeletal muscle autophagy by mediating the induction of autophagic gene expression and the formation of autophagosomes, such that myofibers of mice lacking these HDACs accumulate toxic autophagic intermediates. Strikingly, feeding HDAC1/2 mutant mice a high-fat diet from the weaning age releases the block in autophagy and prevents myopathy in adult mice. These findings reveal an unprecedented and essential role for HDAC1 and HDAC2 in maintenance of skeletal muscle structure and function and show that, at least in some pathological conditions, myopathy may be mitigated by dietary modifications.