In recent years, with the improvement of people's awareness of environmental protection, heavy metal pollution such as Cd2+ and Pb2+ has attracted high attention. This study focuses on the preparation of a highly adsorbent environmental functional material, sulfhydryl modified attapulgite (ATP-SH), through the modification of attapulgite (ATP) using polyethylene glycol-20000 (PEG-20000) as an auxiliary agent and 3-mercaptopropyltrimethoxysilane (MPT). The optimal preparation process was obtained. Furthermore, characterization of ATP and ATP-SH was performed using various techniques including FT-IR, XRD, SEM, among others. The results confirmed successful grafting of sulfhydryl groups onto ATP, with the layered crystal structure and crystallinity of ATP-SH remaining largely unchanged. However, the surface structure and thermal stability were enhanced, while the specific surface area and pore size distribution decreased due to the bulk size of the functional ligands. The characterization results of adsorption performance demonstrated that the adsorption of Cd2+ and Pb2+ by ATP-SH showed significant selectivity and stable adsorption forces. Under these conditions, the saturated adsorption capacities of ATP-SH for Cd2+ and Pb2+ were 22.71 mg/g and 65.57 mg/g, respectively, representing a respective increase of 31.96% and 57.74% compared to ATP. ATP-SH presents an effective remediation approach for heavy metal pollution in the environment.