Biochar is crucial for agricultural output and plays a significant role in effectively eliminating heavy metals (HMs) from the soil, which is essential for maintaining a soil-plant environment. This work aimed to assess machine learning models to analyze the impact of soil parameters on the transformation of HMs in biochar-soil-plant environments, considering the intricate non-linear relationships involved. A total of 211 datasets from pot or field experiments were evaluated. Fourteen factors were taken into account to assess the efficiency and bioavailability of HM-biochar amendment immobilization. Four predictive models, namely linear regression (LR), partial least squares (PLS), support vector regression (SVR), and random forest (RF), were compared to predict the immobilization efficiency of biochar-HM. The findings revealed that the RF model was created using 5-fold cross-validation, which exhibited a more reliable prediction performance. The results indicated that soil features accounted for 79.7% of the absorption of HM by crops, followed by biochar properties at 17.1% and crop properties at 3.2%. The main elements that influenced the result have been determined as the characteristics of the soil (including the presence of different HM species and the amount of clay) and the quantity and attributes of the biochar (such as the temperature at which it was produced by pyrolysis). Furthermore, the RF model was further developed to predict bioaccumulation factors (BAF) and variations in crop uptake (CCU). The R2 values were found to be 0.7338 and 0.6997, respectively. Thus, machine learning (ML) models could be useful in understanding the behavior of HMs in soil-plant ecosystems by employing biochar additions.