Streptococcus pneumoniae is the most common cause of severe bacterial meningitis in children, the elderly, and immunocompromised individuals. To identify virulence factors preferentially expressed during meningitis, we conducted niche-specific genome-wide in vivo transcriptomic analysis after intranasal infection of mice with serotype 4 or 6A pneumococci. The expression of 34 bacterial genes was substantially altered in brain tissue of mice infected with either of the 2 strains. One previously uncharacterized protein, α-glycerophosphate oxidase (GlpO), was cytotoxic for human brain microvascular endothelial cells (HBMECs) via generation of H2O2. A glpO deletion mutant was defective in adherence to HBMECs in vitro as well as in progression from the blood to the brain in vivo. Mutant bacteria also induced markedly reduced meningeal inflammation and brain pathology compared with wild type, despite similar levels of bacteremia. Immunization of mice with GlpO protected against invasive pneumococcal disease and provided additive protection when formulated with pneumolysin toxoid. Our results provide the basis of a strategy that can be adapted to identify genes that contribute to the development of meningitis caused by other pathogens.