The high-density elements are harmful even in low quantities such as heavy trace metals; Arsenic, Copper, Cadmium, Lead, Mercury, and Chromium which are hazardous to the natural resources. They enter waterways by industrial operations, mining, urban runoff, agriculture, e-waste, and pesticides and cause cytotoxicity, neurotoxicity, organ damage, cancer, and weak bones. may remedy heavy metal pollution. Some promising methods that could reduce the heavy metal contamination of wastewater are membrane filtration, catalysts, ion exchange, biosorbent, and nanomaterial adsorption. In this study, Datura metel fruit peel biochar (DPB) infused with zinc oxide nanoparticle (ZnO-NP) is used as a nanocomposite for the remediation of Pb2+ and Cd2+ from synthetic wastewater. The best parameters for DPB and DPB-ZnO3 (3% infusion ratio of ZnO-NP) adsorption of Pb2+ and Cd2+ ions in synthetic wastewater were 3% ZnO infusion ratio, 6.75 solution pH, 65 minutes contact time, and 82 mg/l starting heavy metal concentration. Both DPB and DPB-ZnO biosorbents adsorb Pb2+ better than Cd2+ under the indicated conditions. For Cd2+ adsorption, DPB and DPB-ZnO had the greatest capacities of 27.56 and 48.27 mg/g, respectively. DPB and DPB-ZnO had maximal Pb2+ adsorption capabilities of 25.17 and 49.38 mg/g. The current study represents the adsorption capability of the nanocomposite concludes that Pb2+ and Cd2+ can be efficiently remediated from heavy metal contaminated wastewater that gives substantial advantages in terms of environmental protection and human health.