Carbon microspheres were synthesized under nitrogen flow from walnut shells (WS) and then used as an adsorbent for the removal of Pb (II), Cu(II), Cr(III) and Cd(II) metals. The prepared material was characterized using X-ray photoelectron spectroscopy, scanning electron microscopy, Brounauer-emett-teller surface, Fourier transform infrared and Raman spectroscopy. SEM micrographs showed homogenous sphere-like structure with an average diameter of 4.55 μm. The prepared carbon microspheres exhibit selective and rapid removal of hazardous metals from synthetic water samples. The effects of solution pH, contact time and temperatures on the removal process have been systematically investigated. The material used in this present work present the highest adsorption capacities ever reported for Cr(III), Pb(II), Cd(II) and Cu(II) at an optimum pH of 5, the adsorption capacities reached 792, 638, 574 and 345 mg g−1 for Cr(III), Pb(II), Cd(II) and Cu(II), respectively. Density functional calculations (DFT) showed an agreement with the adsorption process results, Cr(III) had stronger binding ability to the OH and/or COOH functional groups followed by Pb, Cu and Cd. The adsorption mechanism was discussed based on the experimental and theoretical results. Finally, the response surface methodology was used to optimize the adsorption conditions.