AAV vectors that efficiently transduce the mouse brain after intravenous injection are generated with a CRE-dependent selection system. Recombinant adeno-associated viruses (rAAVs) are commonly used vehicles for in vivo gene transfer1,2,3,4,5,6. However, the tropism repertoire of naturally occurring AAVs is limited, prompting a search for novel AAV capsids with desired characteristics7,8,9,10,11,12,13. Here we describe a capsid selection method, called Cre recombination–based AAV targeted evolution (CREATE), that enables the development of AAV capsids that more efficiently transduce defined Cre-expressing cell populations in vivo. We use CREATE to generate AAV variants that efficiently and widely transduce the adult mouse central nervous system (CNS) after intravenous injection. One variant, AAV-PHP.B, transfers genes throughout the CNS with an efficiency that is at least 40-fold greater than that of the current standard, AAV9 (refs. 14,15,16,17), and transduces the majority of astrocytes and neurons across multiple CNS regions. In vitro, it transduces human neurons and astrocytes more efficiently than does AAV9, demonstrating the potential of CREATE to produce customized AAV vectors for biomedical applications.