The invention relates to a method and a device for extracting heavy metal ions from soil, which are used for extracting heavy metal ions from the heavy metal polluted oil. The method comprises the following steps of: forming a heavy metal ion adsorbent by adopting a compound containing carbon nano fibers, active carbon, a cationic surface active agent, acrylamide, potassium acrylate, sludge particles and potassium sulfide; putting the heavy metal ion adsorbent in a porous hard shell to form a porous hard plastic bag; and embedding the porous hard plastic bag into soil for extracting the heavy metal ions. The method and the device for extracting the heavy metal ions from soil aim at the problem of severe pollution of Cd, Cr, Cu, Hg, Pb and Zn of the soil and can effectively absorb, passivate, solidify and extract active ions such as Cd2+, Cr3+, Cu 2+, Hg2+, Pb2+, Zn2+, and the like in plow layers of the soil, maintain microzone water of the soil, release a certain K+ ions and realize the update, the purification and the circular treatment of the absorbent in the device for extracting the heavy metal ions.