The present work was aimed at studying the biosorption of two important heavy metals, viz. Pb and Cr, using defatted seed residue of Cucumis melo as biosorbent. As this study for the biosorption of the selected biosorbent is being carried out for the first time, optimization of the% sorption was carried out with the help of Taguchi method. Three most influential experimental factors were taken into account for this purpose, including the amount of sorbent, amount of sorbate and shaking time. For Pb, maximum% sorption was found to be 94.1%, using 2 g of sorbent and 5 ppm of sorbate after 2 h of shaking. Similarly, for Cr, maximum% sorption was 92.5% using 2 g of sorbent, 10 ppm of sorbate and 3 h of shaking. For Pb, the highest% contribution, which was determined by ANOVA, was given by the amount of sorbate (54.7%) followed by the amount of sorbent (38.8%) and the least contribution was given by the shaking time (6.47%). Similarly, for Cr, the highest% contribution, which was determined by ANOVA, was given by the amount of sorbate (75%) followed by the amount of sorbent (16%) and the least contribution was given by the shaking time (8.65%). Kinetic and isothermal studies were also performed to understand the nature of adsorption mechanism. For this purpose, linear and non-linear forms of three sorption isotherms were employed including Freundlich, Langmuir and Dubnin–Radushkevich isotherm. From these observations, it can be concluded that the defatted seed residue of Cucumis melo can be regarded as a novel, renewable, green and cost-effective biosorbent for removal of heavy metals from wastewater.