Mercury (Hg) and lead (Pb) pose significant risks to human health due to their high toxicity and bioaccumulative properties. This study aimed to develop a novel biochar composite (HMB-S), polyfunctionalized with manganese dioxide (α-MnO2) and sulfur functional groups, for the effective immobilization of Hg(II) and Pb(II) from contaminated environments. HMB-S demonstrated superior adsorption capacities of 190.1 mg/g for Hg(II) and 259.9 mg/g for Pb(II), which significantly surpasses the capacities of unmodified biochar (HB) and biochar functionalized solely with Mn (HMB). Mechanistic studies revealed that the immobilization of these metals by HMB-S involved ion exchange, mineral precipitation, surface complexation, and electrostatic interactions. In soil incubation experiments, HMB-S significantly decreased the levels of extractable Hg(II) and Pb(II) compared to the control, reducing the mobility of these metals and converting 17 % of Hg(II) and 26 % of Pb(II) into less bioavailable residual forms. Pot experiments confirmed that all tested biochar materials (HB, HMB, and HMB-S) promoted spinach growth in contaminated soils, with HMB-S being the most effective at lowering Hg(II) and Pb(II) uptake by plants. Additionally, analysis of soil microbial communities indicated that HMB-S altered community composition and increased the relative abundance of metal-resistant bacteria. These findings highlight the potential of polyfunctionalized biochar HMB-S as an effective remediation strategy for Hg and Pb contamination in soil and aqueous environments.