Heavy metal pollution is a critical environmental and public health issue, necessitating the development of effective adsorbent materials for water purification. Sulfur-based polymers synthesized via inverse vulcanization have emerged as promising candidates for heavy metal adsorption. This study introduces the synthesis of polysulfides bearing β-diketone functional groups through the inverse vulcanization of acetoacetoxyethyl methacrylate and sulfur. The successful copolymerization and integration of the acetoacetate moiety into the polymer chain were verified using NMR, FT-IR, Raman, XPS, XRD, DSC, and TGA analyses. A porous version of the adsorbent was fabricated using a simple template-assisted method with NaCl as a porogen. The porous structure was characterized using X-ray micro-CT and SEM, revealing detailed insights into its internal and surface porosity. The adsorption capabilities of the synthesized polymer were tested in a multielement solution containing various metal ions. The porous adsorbent demonstrated exceptional heavy metal chelation, achieving 100% removal efficiency for Hg²⁺ and 72-96% removal for Cr³⁺, Pb²⁺, Co²⁺, Fe³⁺, Ni²⁺, Ag⁺, and Cu²⁺. The enhanced adsorption capacity is attributed to the synergistic effects of thiol functional groups, polysulfide loops, and the strong binding affinity of the β-diketone moiety and hydroxyl group, combined with the material's well-defined porous structure. Additionally, a monolithic prototype of the porous adsorbent was developed, retaining all the advantages of the particulate form while enabling easy separation from treated water by lifting it as a single unit, thereby eliminating the need for filtration. This study offers a practical and efficient solution for heavy metal removal in water treatment applications.