This research is to predict heavy metal levels in plants, particularly in Robinia pseudoacacia L., and soils using an effective artificial intelligence approach with some ecological parameters, thereby significantly eliminating common defects such as high cost and seriously tedious and time-consuming laboratory procedures. In this respect, the artificial neural network (ANN) is employed to estimate the concentrations of essential heavy metals such as Fe, Mn and Ni, depending on the Cu and Zn concentrations of plant and soil samples collected from five different locations. The derived relative errors for the constructed ANN model have been computed within the ranges 0.041-0.051, 0.017-0.025, and 0.026-0.029 for the training, testing and holdout data regarding Fe, Mn, and Ni, respectively. In addition, it has been realized that the relative errors could be diminished up to 0.007 for Fe, 0.014 for Mn and 0.022 for Ni by considering the Cu, Zn, location and plant parts as independent variables during the analysis. The results produced seem instructive and pioneering for environmentalists and scientists to design optimal study programs to leave a livable ecosystem.