Heavy crude oil contaminated soil, in addition to affecting the lives of plants and animals, also endangers aquatic life. These metals are in the process of extraction of crude oil into the soil and thus have destructive effects on the environment itself. In this research, the removal of heavy metals lead, nickel, and chromium from crude oil contaminated soil using saponin biosurfactant was investigated. The results showed that by increasing the concentration of saponin, the percentage of removal of metals increased. So in the concentration of 3 g/l of saponin, the removal efficiency of nickel, chromium, and lead was 73%, 58%, and 43%, respectively. Also, increasing pH to 10 and temperature to 75 ° C had a negative effect on the removal efficiency of metals. The results also showed that optimum conditions for removal of nickel, chromium, and lead metals were at a temperature of 25° C, pH equal to 4, and saponin biosurfactant concentration of 3g/l. Compared to the SDS chemical surfactant, in optimal conditions and in the large mesh (850 µ m), the saponin yield was higher than SDS in Ni and Cr. Therefore, according to the results of this study, biological surfactants can be used instead of chemical surfactants from an environmental point of view.