Traditional Chinese medicine (TCM) has been a cornerstone of health care for centuries, valued for its preventive and therapeutic properties. However, recent decades have revealed significant toxicological concerns associated with TCMs due to their complex chemical compositions. Traditional QSAR (quantitative structure-activity relationships) models, which predict toxicity based on chemical structures, face challenges with the intricate nature of TCM compounds. In this study, we effectively resolved this issue by correlating the toxicity of TCMs with advanced analytical descriptors from electron ionization mass spectra (EI-MS) data. The optimal classification model achieved a balanced accuracy of over 0.74. Through interpretable machine learning models, we identified specific toxic components, such as 13-hexyloxacyclotridec-10-en-2-one and loliolide. We applied molecular dynamics (MD) simulations to explore the interactions of identified toxic components with crucial protein targets, using hepatic cytochrome P450 3A4 as an example. This novel approach not only enhances our understanding of the toxicological profiles of TCMs but also maximizes their therapeutic benefits while minimizing adverse effects. More importantly, our findings support the application of analytical descriptor-based machine learning in predicting the toxicity of unknown mixtures in the real environment.