Metagenomic next-generation sequencing (NGS) of cerebrospinal fluid (CSF) has the potential to identify a broad range of pathogens in a single test.In a 1-year, multicenter, prospective study, we investigated the usefulness of metagenomic NGS of CSF for the diagnosis of infectious meningitis and encephalitis in hospitalized patients. All positive tests for pathogens on metagenomic NGS were confirmed by orthogonal laboratory testing. Physician feedback was elicited by teleconferences with a clinical microbial sequencing board and by surveys. Clinical effect was evaluated by retrospective chart review.We enrolled 204 pediatric and adult patients at eight hospitals. Patients were severely ill: 48.5% had been admitted to the intensive care unit, and the 30-day mortality among all study patients was 11.3%. A total of 58 infections of the nervous system were diagnosed in 57 patients (27.9%). Among these 58 infections, metagenomic NGS identified 13 (22%) that were not identified by clinical testing at the source hospital. Among the remaining 45 infections (78%), metagenomic NGS made concurrent diagnoses in 19. Of the 26 infections not identified by metagenomic NGS, 11 were diagnosed by serologic testing only, 7 were diagnosed from tissue samples other than CSF, and 8 were negative on metagenomic NGS owing to low titers of pathogens in CSF. A total of 8 of 13 diagnoses made solely by metagenomic NGS had a likely clinical effect, with 7 of 13 guiding treatment.Routine microbiologic testing is often insufficient to detect all neuroinvasive pathogens. In this study, metagenomic NGS of CSF obtained from patients with meningitis or encephalitis improved diagnosis of neurologic infections and provided actionable information in some cases. (Funded by the National Institutes of Health and others; PDAID ClinicalTrials.gov number, NCT02910037.).