Soil that has been contaminated by heavy metals is a serious environmental problem. A different approach for forecasting a variety of soil physical parameters is reflected spectroscopy is a low-cost, quick, and repeatable analytical method. The objectives of this paper are to predict heavy metal (Ti, Cr, Sr, Fe, Zn, Cu and Pb) soil contamination in central and southern Iraq using spectroscopy data. An XRF was used to quantify the levels of heavy metals in a total of 53 soil samples from Baghdad and ThiQar, and a spectrogram was used to examine how well spectral data might predict the presence of heavy metals metals. The partial least squares regression PLSR models performed well in predicting the Sr and Cr elements using spectroscopy, with coefficients R2 = 0.73 and RMSE = 63.8 for the determination, and R2 = 0.60 and RMSE = 16.4 for Cr, respectively. This research validates the detection of heavy metal contamination using reflectance spectroscopy. Results of the current study proved that some heavy elements have spectral features become either when their concentrations low or high, such as Cr, Sr, Cu and Zn. The current study opens new possibilities for studying these elements using remote sensing in the future.