To improve the remediation effectiveness of biochar in heavy metal (HM) contaminated media, it is crucial to develop multifunctional biochar materials with enhanced adsorption performance for HMs. In this work, a versatile biochar fertilizer (MBF) with exceptionally high adsorption capacities and enhanced co-adsorption ability for multiple heavy metals was synthesized using corn straw as a precursor, and then employed as a remediation agent in HM-contaminated soil. The maximum adsorption capacity of MBF for Pb(II), Cd(II), Cu(II) and Zn(II) was 1666.74, 505.05, 304.88 and 250.00 mg/g, respectively, much higher than reported biochar adsorbents. Leaching experiment demonstrated that MBF showed strong co-adsorption ability for Pb (II), Cd (II), Cu (II) and Zn (II) with corresponding removal rate increased by 2.63, 2.3, 2.04 and 1.67 times than that of MgO-modified biochar. The removal efficiency of heavy metals by MBF was predominantly influenced by various factors, including the dissolution-precipitation of Mg-P precipitates, ion exchange with Mg2+, surface complexation, electrostatic attraction, and cation-π interaction. Noteworthy is that MBF not only significantly promoted the plant growth in both the normal and heavy metal-contaminated soil, but also inhibited the migration of the heavy metals into the seedlings. MBF has dual functions of remediating heavy metals and improving soil fertility, showing great potential in promoting the sustainable development of agricultural production.