In this study, MgO-modified sludge biochar (1MBC) prepared from sewage sludge was successfully used as an efficient adsorbent to remove heavy metals from groundwater. The adsorption performance and mechanism of 1MBC on Cu2+ and Cd2+ were investigated in single and binary systems, and the contribution of different mechanisms was quantified. Adsorption kinetics and isotherms analysis revealed that the adsorption processes of Cu2+ and Cd2+ by 1MBC followed the pseudo-second-order kinetic and Langmuir isotherm model in both systems, indicating that Cu2+ and Cd2+ were mainly controlled by chemisorption, and their theoretical maximum adsorption capacities were 240.36 and 219.06 mgg(-1), respectively. The results of the binary system showed that due to the competitive adsorption, the adsorption capacity of 1MBC for both heavy metals was lower than that of the single system, and the selective adsorption of Cu2+ was higher. The influencing variable experiments revealed that the adsorption of Cu2+ and Cd2+ by 1MBC had a wide pH adaption range and strong anti-interference ability to coexisting organics and ions. The adsorption mechanisms involved ion exchange (Cu: 47.39%, Cd: 53.17%), mineral precipitation (Cu: 35.31%, Cd: 24.18%), functional group complexation (Cu: 10.44%, Cd: 14.53%), and other possible mechanisms (Cu: 6.87%, Cd: 8.12%). Furthermore, 1MBC demonstrated excellent regeneration potential after five cycle times. Overall, the results have significant reference value for the practical application of removing heavy metals.