We determined the clinical value of metagenomic next-generation sequencing (mNGS) of cerebrospinal fluid (CSF) for the diagnosis of patients with suspected encephalitis or meningitis infection. Clinical data were collected and retrospectively analyzed from patients with suspected cases of encephalitis or meningitis who presented at four hospitals in Ningbo from January 1st, 2019 to December 31st, 2020. Of a total of 66 suspected cases, 41 (62.12%) were diagnosed with central nervous system infections, which included 18 cases (27.27%) of viral infection, 13 cases (19.70%) of bacterial infection, 3 cases (4.55%) of Mycobacterium tuberculosis, 5 cases (7.58%) of fungal infection, and 2 cases (3.03%) of Rickettsia infection. From these cases, mNGS identified 25 (37.88%) true-positive cases, 8 (12.12%) false-positive cases, 20 (30.30%) true-negative cases, and 13 (19.70%) false-negative cases. The sensitivity of mNGS was 65.79% with a specificity of 71.43%. The positive rate was higher compared with traditional methods (37.88% vs. 24.39%). The results indicate that mNGS technology is a more sensitive method for detecting suspected infectious encephalitis or meningitis compared with traditional pathogen detection methods.