Brainstem gliomas (BSGs) harboring a histone 3 lysine27-to-methionine (H3K27M) mutation represent one of the deadliest brain tumors with a dismal prognosis, as they exhibit a much worse response to therapy compared to the wildtype BSGs. Early non-invasive recognition of the H3K27M mutation is paramount for clinical decision-making in treating BSGs. Plasma and urine samples were prospectively collected from BSG patients before biopsy or surgical resection and were chronologically divided into discovery, test, and validation cohorts. Utilizing the discovery and test cohort samples, an untargeted metabolomic strategy was exploited to identify candidate metabolite biomarkers, related to the H3K27M mutation. The candidate biomarkers were validated in the validation cohort with a targeted metabolomic method. Differential metabolomic profiles were detected between the H3K27M-mutant and wild-type BSGs in both the plasma and urine, the metabolomic changes were more dramatic in urine than in plasma. After rigorous screening for candidate biomarkers and validation with a targeted metabolomic approach, three metabolites, nomilin, Lys-Leu, and hawkinsin, emerged as significantly elevated biomarkers in H3K27M-mutant BSG urine samples. The biomarker panel combining the three metabolites had a diagnostic area under the curve (AUC) of approximately 75%. Furthermore, the biomarker panel improved the prediction accuracy of radiomics/clinical models to an AUC value high as 93.38%. A urinary metabolite biomarker panel that exhibited high accuracy for non-invasive prediction of the H3K27M mutation status in BSG patients was identified. This panel has the potential to improve the predictive performance of current radiomics models or clinical features.