Hydrothermal carbonization (HTC) has been a promising treatment technology of heavy metal-enriched hyperaccumulator biomass to produce superior hydrochar adsorbent for contamination removal from the wastewater. However, a high amount of heavy metal in derived hydrochar limits its further application. In this study, the effect of reaction temperature (180–270 ℃) and medium pH during HTC on heavy metal contents, speciation and leaching risk of hydrochar from the hyperaccumulator biomass Sedum alfredii Hance was investigated to assess its environmental risk. HTC at a low reaction temperature and acid addition facilitated the removal of Zn/Cd/Pb from the solid phase, meanwhile the addition of acid favored the immobilization of Zn/Cd/Pb and lowered the potential leaching risk of Zn/Cd/Pb. Hydrochar prepared from HTC at 240 °C and pH = 2 had lower heavy metal content and lower releasing risk, followed by KOH modification to obtain high adsorption performance. The modified hydrohcar (KSAB) were characterized by SEM, XRD, BET, Boehm titration and FT-IR, and showed that the surface specific surface area and pore structure were optimized and OFGs of hydrochar were improved significantly after KOH treatment. Adsorption experiments showed that the Cd(II) adsorption process onto KSAB well accorded with pseudo-second-order kinetics and Langmuir isotherms. The maximum Cd(II) adsorption capacity of KSAB was 25.69 mg/g, which was 17 times compared to that of pristine hydrochar. Microstructure characteristics and mechanism analysis further suggested that electrostatic interactions, surface complexation, cation-π and ion exchange were the main Cd(II) removal mechanisms of KOH-modified hydrochar. Therefore, hydrochar derived from hyperaccumulator biomass can be used as a highly efficient absorbent to remove Cd(II) from wastewater after KOH modification.