Due to the combined influences such as ore-forming temperature, fluid and metal sources, sphalerite tends to incorporate diverse contents of trace elements during the formation of different types of Lead-zinc (Pb-Zn) deposits. Therefore, trace elements in sphalerite have long been utilized to distinguish Pb-Zn deposit types. However, previous discriminant diagrams usually contain two or three dimensions, which are limited to revealing the complicated interrelations between trace elements of sphalerite and the types of Pb-Zn deposits. In this study, we aim to prove that the sphalerite trace elements can be used to classify the Pb-Zn deposit types and extract key factors from sphalerite trace elements that can discriminate Pb-Zn deposit types using machine learning algorithms. A dataset of nearly 3600 sphalerite spot analyses from 95 Pb-Zn deposits worldwide determined by LA-ICP-MS was compiled from peer-reviewed publications, containing 12 elements (Mn, Fe, Co, Cu, Ga, Ge, Ag, Cd, In, Sn, Sb, and Pb) from 5 types, including Sedimentary Exhalative (SEDEX), Mississippi Valley Type (MVT), Volcanic Massive Sulfide (VMS), skarn, and epithermal deposits. Random Forests (RF) is applied to the data processing and the results show that trace elements of sphalerite can successfully discriminate different types of Pb-Zn deposits except for VMS deposits, most of which are falsely distinguished as skarn and epithermal types. To further discriminate VMS deposits, future studies could focus on enlarging the capacity of VMS deposits in datasets and applying other geological factors along with sphalerite trace elements when constructing the classification model. RF’s feature importance and permutation feature importance were adopted to evaluate the element significance for classification. Besides, a visualized tool, t-distributed stochastic neighbor embedding (t-SNE), was used to verify the results of both classification and evaluation. The results presented here show that Mn, Co, and Ge display significant impacts on classification of Pb-Zn deposits and In, Ga, Sn, Cd, and Fe also have relatively important effects compared to the rest elements, confirming that Pb-Zn deposits discrimination is mainly controlled by multi-elements in sphalerite. Our study hence shows that machine learning algorithm can provide new insights into conventional geochemical analyses, inspiring future research on constructing classification models of mineral deposits using mineral geochemistry data.