• Machine learning models (XGBoost, GBDT, CatBoost) accurately predict heavy metal occurrence forms in tailings, with R² > 0.859 on test sets.
• Electronegativity is the most influential feature, with an average importance of 0.4522, highlighting its role in HM speciation.
• Stacking ensemble learning further improves prediction accuracy, increasing R² to 0.879, demonstrating the benefit of model integration.
• The developed empirical method offers a rapid, cost-effective alternative to traditional sequential extraction, aiding environmental assessment and tailings recycling.