The amalgamation of surface-enhanced Raman spectroscopy (SERS) and machine learning (ML) presents a discerning capability to differentiate among a diverse spectrum of bacterial strains. However, addressing the challenge of achieving expeditious and robust bacterial detection remains a prominent focal point. This study delineates a comprehensive bacterial classification and identification methodology grounded in the amoxicillin response, which effectively categorizes bacteria utilizing SERS and ML within a time frame of less than 20 min. The bacterial specimens are subjected to pharmacological stimulation, inducing the release of purine molecules that are integral to metabolic processes. Capitalizing on the preferential entry of these molecules into SERS hot spots over the bacteria themselves facilitates the consistent acquisition of stable SERS signals. Experimental evidence demonstrates that the interaction of S. aureus, E. coli, S. epidermidis, C. albicans, and K. pneumoniae with amoxicillin contributes to an enhancement in the stability and signal intensity of bacterial SERS. Utilizing a random forest (RF) model on pure bacterial samples yields an exemplary classification accuracy of 99%. Furthermore, the application of three distinct models, support vector machine (SVM), RF, and CNN-LSTM-Attention (CLA) in the analysis of clinical samples culminates in final classification accuracies of 92%, 87%, and 96%, respectively. This approach establishes a rapid, straightforward, and stable classification methodology for SERS-based bacterial detection, demonstrating significant potential for clinical diagnostic applications.