In the present study, the aluminum-containing wastewater treatment residue was modified at 400 °C and 2.5 mol/L HCl and used in the removal of Pb and Cd from an aqueous solution for the first time. The modified sludge was characterized by SEM, XRD, FTIR, and BET. Under the optimized conditions, including pH 6, adsorbent dose 3 g/L, Pb/Cd reaction time 120 and 180 min, and Pb/Cd concentration 400 and 100 mg/L, Pb/Cd adsorption capacity was obtained as 90.72 and 21.39 mg/g, respectively. The adsorption process of sludge before and after modification is more consistent with the quasi-second-order kinetics, and the correlation coefficients R2 are all above 0.99. The fitting of data with the Langmuir isotherm and pseudo-second-order kinetics showed that the adsorption process is monolayer and chemical in nature. The adsorption reaction included ion exchange, electrostatic interaction, surface complexation, cation-π interaction, co-precipitation, and physical adsorption. This work implies that the modified sludge has greater potential in the removal of Pb and Cd from wastewater relative to raw sludge.