The role of oral microbiota in viral encephalitis and/or viral meningitis (VEVM) remains unclear. In this hospital-based, frequency-matched study, children with clinically diagnosed VEVM (n = 68) and those with other diseases (controls, n = 68) were recruited. Their oral swab samples were collected and the oral microbiota was profiled using 16S rRNA gene sequencing. The oral microbiota of children with VEVM exhibited different beta diversity metrics (unweighted UniFrac distance: P < 0.001, R2 = 0.025, Bray-curtis dissimilarity: P = 0.045, R2 = 0.011, and Jaccard dissimilarity: P < 0.001, R2 = 0.017) and higher relative abundances of taxa identified by Linear discriminant analysis (LDA) with effect size (Enterococcus, Pedobacter, Massilia, Prevotella_9, Psychrobacter, Butyricimonas, Bradyrhizobium, etc., LDA scores > 2.0) when compared with the control group. The higher pathway abundance of steroid hormone biosynthesis predicted by oral microbiota was suggested to be linked to VEVM (q = 0.020). Further, a model based on oral microbial traits showed good predictive performance for VEVM with an area under the receiver operating characteristic curve of 0.920 (95% confidence interval: 0.834–1.000). Similar results were also obtained between children with etiologically diagnosed VEVM (n = 43) and controls (n = 68). Our preliminary study identified VEVM-specific oral microbial traits among children, which can be effective in the diagnosis of VEVM.