This study focuses on exploring the indication and importance of selenium (Se) and tellurium (Te) in distinguishing different genetic types of ore deposits. Traditional views suggest that dispersed elements are unable to form independent deposits, but are hosted within deposits of other elements as associated elements. Based on this, the study collected trace elemental data of pyrite, sphalerite, and chalcopyrite in various types of Se-Te bearing deposits. The optimal end-elements for distinguishing different genetic type deposits were recognized by principal component analysis (PCA) and the silhouette coefficient method, and discriminant diagrams were drawn. However, support vector machine (SVM) calculation of the decision boundary shows low accuracy, revealing the limitations in binary discriminant visualization for ore deposit type discrimination. Consequently, two machine learning algorithms, random forest (RF) and SVM, were used to construct ore genetic type classification models on the basis of trace elemental data for the three types of metal sulfides. The results indicate that the RF classification model for pyrite exhibits the best performance, achieving an accuracy of 94.5% and avoiding overfitting errors. In detail, according to the feature importance analysis, Se exhibits higher Shapley Additive Explanations (SHAP) values in volcanogenic massive sulfide (VMS) and epithermal deposits, especially the latter, where Se is the most crucial distinguishing element. By comparison, Te shows a significant contribution to distinguishing Carlin-type deposits. Conversely, in porphyry- and skarn-type deposits, the contributions of Se and Te were relatively lower. In conclusion, the application of machine learning methods provides a novel approach for ore genetic type classification and discrimination research, enabling more accurate identification of ore genetic types and contributing to the exploration and development of mineral resources.