Background: A mass spectrometry-based assessment of methicillin resistance in Staphylococcus aureus would have huge potential in addressing fast and effective prediction of antibiotic resistance. Since delays in the traditional antibiotic susceptibility testing, methicillin-resistant S. aureus remains a serious threat to human health. Results: Here, linking a 7 years of longitudinal study from two cohorts in the Taiwan area of over 20 000 individually resolved methicillin susceptibility testing results, we identify associations of methicillin resistance with the demographics and mass spectrometry data. When combined together, these connections allow for machine-learning-based predictions of methicillin resistance, with an area under the receiver operating characteristic curve of >0.85 in both the discovery [95% confidence interval (CI) 0.88-0.90] and replication (95% CI 0.84-0.86) populations. Conclusions: Our predictive model facilitates early detection for methicillin resistance of patients with S. aureus infection. The large-scale antibiotic resistance study has unbiasedly highlighted putative candidates that could improve trials of treatment efficiency and inform on prescriptions.