Chitosan nanoparticles, a low-cost, less toxic, and environment-friendly waste generated in shrimp-processing factories, synthesized from shrimp shells, were evaluated as biosorbents for the removal of Pb(II), Cd(II), Ni(II), Cu(II), and Mn(II) from aqueous solutions. Shrimp shells were processed, dried, demineralized, deproteinized, and deacetylated to obtain chitosan. Small chitosan nanoparticles were synthesized by an ultrasound-assisted ionic gelation process to prevent agglomeration upon freeze-drying. The chitosan nanoparticles were characterized by scanning electron microscopy, transmission electron microscopy, and Fourier transform infrared spectroscopy (FTIR). This novel synthetic strategy improved the stability and the adsorption efficiency of the chitosan nanoparticles. The effects of contact time, pH, temperature, and metal-ion concentration on the adsorption performance of the nanoparticles were investigated in a batch adsorption system for each metal ion. All these variables showed a significant effect on the adsorption process. Kinetic and isotherm experiments were also carried out at the optimum pH, temperature, adsorbent amount, contact time, and metal-ion concentrations. Adsorption thermodynamics was also studied by evaluating the change in Gibbs free energy, entropy, and enthalpy. The adsorption data match well with the pseudo-second-order kinetics and Langmuir isotherm model with a correlation coefficient (R2 > 0.98). The thermodynamic analysis shows that the adsorption process was endothermic and spontaneous at high temperatures for all metal ions, except Pb(II) that showed a spontaneous behavior at low temperatures. The Gibbs energy values at 298 K were − 7.48, − 3.74, − 5.06, − 2.46, and − 0.89 kJ/mol K for Pb(II), Cu(II), Cd(II), Mn(II), and Ni(II) ions, respectively. Furthermore, the FTIR results showed that the electrons on the free –NH2 and –OH groups of chitosan nanoparticles and the P=O of the cross-linker tripolyphosphate could bind to metal ions in the sorption process. This study shows that chitosan nanoparticles are a promising, inexpensive biosorbent for the removal of toxic heavy metals from aqueous solutions. Graphical abstract: Graphical abstract of adsorption of heavy metal ions through chitosan nanoparticles with a thermodynamic van’t Hoff plot.[Figure not available: see fulltext.]. © 2021, The Author(s), under exclusive licence to Springer Nature Switzerland AG.