Navigated transcranial magnetic stimulation (nTMS) is a well-established preoperative mapping tool for motor-eloquent glioma surgery. Machine learning (ML) and nTMS may improve clinical outcome prediction and histological correlation. This was a retrospective cohort study of patients who underwent surgery for motor-eloquent gliomas between 2018 and 2022. Ten healthy subjects were included. Preoperative nTMS-derived variables were collected: resting motor threshold (RMT), interhemispheric RMT ratio (iRMTr)-abnormal if above 10%-and cortical excitability score-number of abnormal iRMTrs. World Health Organization (WHO) grade and molecular profile were collected to characterize each tumor. ML models were fitted to the data after statistical feature selection to predict tumor grade. A total of 177 patients were recruited: WHO grade 2-32 patients, WHO grade 3-65 patients, and WHO grade 4-80 patients. For the upper limb, abnormal iRMTr were identified in 22.7% of WHO grade 2, 62.5% of WHO grade 3, and 75.4% of WHO grade 4 patients. For the lower limb, iRMTr was abnormal in 23.1% of WHO grade 2, 67.6% of WHO grade 3%, and 63.6% of WHO grade 4 patients. Cortical excitability score ( P = .04) was statistically significantly related with WHO grading. Using these variables as predictors, the ML model had an accuracy of 0.57 to predict WHO grade 4 lesions. In subgroup analysis of high-grade gliomas vs low-grade gliomas, the accuracy for high-grade gliomas prediction increased to 0.83. The inclusion of molecular data into the model-IDH mutation and 1p19q codeletion status-increases the accuracy of the model in predicting tumor grading (0.95 and 0.74, respectively). ML algorithms based on nTMS-derived interhemispheric excitability assessment provide accurate predictions of HGGs affecting the motor pathway. Their accuracy is further increased when molecular data are fitted onto the model paving the way for a joint preoperative approach with radiogenomics.