The main goal of brain tumor surgery is to maximize tumor resection while preserving brain function. However, existing imaging and surgical techniques do not offer the molecular information needed to delineate tumor boundaries. We have developed a system to rapidly analyze and classify brain tumors based on lipid information acquired by desorption electrospray ionization mass spectrometry (DESI-MS). In this study, a classifier was built to discriminate gliomas and meningiomas based on 36 glioma and 19 meningioma samples. The classifier was tested and results were validated for intraoperative use by analyzing and diagnosing tissue sections from 32 surgical specimens obtained from five research subjects who underwent brain tumor resection. The samples analyzed included oligodendroglioma, astrocytoma, and meningioma tumors of different histological grades and tumor cell concentrations. The molecular diagnosis derived from mass-spectrometry imaging corresponded to histopathology diagnosis with very few exceptions. Our work demonstrates that DESI-MS technology has the potential to identify the histology type of brain tumors. It provides information on glioma grade and, most importantly, may help define tumor margins by measuring the tumor cell concentration in a specimen. Results for stereotactically registered samples were correlated to preoperative MRI through neuronavigation, and visualized over segmented 3D MRI tumor volume reconstruction. Our findings demonstrate the potential of ambient mass spectrometry to guide brain tumor surgery by providing rapid diagnosis, and tumor margin assessment in near-real time.