Accurate prediction of heavy metals (HMs) spatial distribution in mining areas is crucial for pollution management. However, predicting the spatial distribution of HMs remains a significant challenge in mining areas with complex terrain and variable contaminant transport pathways. This study aims to optimize the spatial prediction of arsenic (As) distribution in the Shimen realgar mining area, the largest in Asia, by integrating machine learning models with kriging interpolation and feature selection techniques. The results show that the Random Forest (RF) model achieved the best performance in predicting soil As concentration, with an R