Bioengineering of viral vectors for therapeutic gene delivery is a pivotal strategy to reduce doses, facilitate manufacturing, and improve efficacy and patient safety. Here, we engineered myotropic adeno-associated viral (AAV) vectors via a semirational, combinatorial approach that merges AAV capsid and peptide library screens. We first identified shuffled AAVs with increased specificity in the murine skeletal muscle, diaphragm, and heart, concurrent with liver detargeting. Next, we boosted muscle specificity by displaying a myotropic peptide on the capsid surface. In a mouse model of X-linked myotubular myopathy, the best vectors-AAVMYO2 and AAVMYO3-prolonged survival, corrected growth, restored strength, and ameliorated muscle fiber size and centronucleation. In a mouse model of Duchenne muscular dystrophy, our lead capsid induced robust microdystrophin expression and improved muscle function. Our pipeline is compatible with complementary AAV genome bioengineering strategies, as demonstrated here with two promoters, and could benefit many clinical applications beyond muscle gene therapy.