Adeno-associated virus (AAV) is emerging as a vector of choice for muscle gene therapy because of its effective and stable transduction in striated muscles. AAV naturally evolve into multiple serotypes with diverse capsid gene sequences that are apparently the determinants of their tissue tropism and infectivity. Certain AAV serotypes show robust gene transfer upon direct intramuscular injection, while others are effective in crossing the endothelial barrier to reach muscle when delivered intravenously. Muscular dystrophy gene therapy requires efficient body-wide muscle gene transfer. However, preferential liver transduction by nearly all natural AAV serotypes could be an undesirable feature for muscle-directed applications, especially by means of systemic gene delivery. Here we describe a method of in vitro evolution and in vivo selection of AAV capsids that target striated muscles and detarget the liver. Using DNA shuffling technology, we have generated a capsid gene library by in vitro scrambling and shuffling the capsid genes of natural AAV1 to AAV9. To minimize the bias and limitation of in vitro screening on culture cells, we performed direct in vivo panning in adult mice after intravenous injection of the shuffled capsid library that packaged their own coding sequences. The AAV variants enriched in the heart and muscle are retrieved by capsid gene PCR and subsequently characterized for their tissue tropisms. This directed evolution and in vivo selection method should be useful in generating novel gene therapy vectors for muscle and heart and other tissues.