Delivery of genes to the brain and spinal cord across the blood-brain barrier (BBB) has not yet been achieved. Here we show that adeno-associated virus (AAV) 9 injected intravenously bypasses the BBB and efficiently targets cells of the central nervous system (CNS). Injection of AAV9-GFP into neonatal mice through the facial vein results in extensive transduction of dorsal root ganglia and motor neurons throughout the spinal cord and widespread transduction of neurons throughout the brain, including the neocortex, hippocampus and cerebellum. In adult mice, tail vein injection of AAV9-GFP leads to robust transduction of astrocytes throughout the entire CNS, with limited neuronal transduction. This approach may enable the development of gene therapies for a range of neurodegenerative diseases, such as spinal muscular atrophy, through targeting of motor neurons, and amyotrophic lateral sclerosis, through targeting of astrocytes. It may also be useful for rapid postnatal genetic manipulations in basic neuroscience studies.