Background: The present study investigated the concentrations of lead, nickel, copper, zinc, their toxicity potential, and their ecological hazard in surface soils of Hamedan City, Iran. Also, using the Bio-concentration Factor (BCF), concentration Comprehensive Bio-concentration Index (CBCI), and Metal Accumulation Index (MAI), was evaluated the ability of some tree and shrub species to absorb heavy metals in soil and air. Methods: Sampling of leaves of nine tree species and shrubs (plane, acacia, elm, willow, mulberry, ash, redbud, pine, and cypress) was performed in six stations. After preparation and acid digestion of the samples, the concentrations of heavy metals were determined using an atomic absorption spectrometer. Results: The trend of changes in soil heavy Mean±SD metal concentrations was in the order of nickel> zinc> copper> lead in the amounts of 61.41±11.34˃ 43.04±14.4˃ 42.87±8.36˃ 18.77±6.51 mg/kg. Evaluation of acute toxicity potential indicators and ecological risk of heavy metals indicated low soil pollution status. Findings of BCF, CBCI, and MAI ndices in the leaves of the species showed that the highest levels of BCF of heavy metals, i.e., zinc, copper, lead, and nickel, were in willow, elm, cypress, and pine species, respectively. Results show that heavy metal accumulation in different species. Conclusion: Depends on soil type, tree species, climatic conditions, type of pollutant source, species age, and other factors. In this study, elm and acacia have the highest ability to absorb heavy metals from soil and air.