The discharge of lead and cadmium wastewater, along with the pollution caused by phosphogypsum, represents a particularly urgent environmental issue. This study employed a straightforward hydrothermal method to convert phosphogypsum into porous calcium silicate hydrate (P-CSH), which was then used to remove and recover Pb(II) and Cd(II) from wastewater. The adsorption capacities of P-CSH for Pb(II) and Cd(II) were notably high at 989.3 mg/g and 290.3 mg/g, respectively. The adsorption processes adhered to the pseudo-second-order kinetics model and the Langmuir isotherm model. Due to identical adsorption sites on P-CSH for both Pb(II) and Cd(II), competitive interaction occurred when both ions were present simultaneously. Additionally, the adsorption efficacy was minimally impacted by the presence of common coexisting cations in wastewater. The dominant mechanisms for removing Pb(II) and Cd(II) via P-CSH were chemical precipitation and surface complexation. Moreover, the adsorbed heavy metals were efficiently separated and reclaimed from the wastewater through a stepwise desorption process. The primary components of the residue from stepwise desorption were quartz and amorphous SiO2. Following dissolution via pressurized alkaline leaching, this residue could be recycled for synthesizing P-CSH. This research offered a new strategy for the resourceful use of phosphogypsum and heavy metal wastewater.