With the advancement of industrial production and urban modernization, pollution from heavy metal ions and the accumulation of solid waste have become critical global environmental challenges. Establishing an effective recycling system for solid waste and removing heavy metals from wastewater is essential. Coal gangue was used in this study as the primary material for the synthesis of a fully coal gangue-based phosphorus-silicon-aluminum (SAPO-5) molecular sieve through a hydrothermal process. The SAPO-5 molecular sieve was characterized through several methods, including X-ray diffraction (XRD), scanning electron microscopy (SEM), BET surface analysis, Fourier-transform infrared (FT-IR) spectroscopy, and X-ray photoelectron spectroscopy (XPS), to examine its mineral phases, microstructure, pore characteristics, and material structure. Adsorption performance towards wastewater with Cd