The aim of this study was preparation and optimisation of a controlled-release delivery system to decrease the dose-dependent side effects of gentamicin. Hydrogel nanoparticles composed of a polycationic polymer (chitosan) and an inorganic polyanion (sodium tripolyphosphate) were fabricated in the presence of gentamicin. An experimental design was drawn upon to determine the optimum condition of nanoparticle preparation. Various features of the nanoparticles including drug loading parameters, particle size distribution, zeta potential and in vitro drug release profile were evaluated. Ultimately, the antimicrobial activity of the gentamicin-loaded nanoparticles was analysed by determination of the minimum inhibitory concentration (MIC) and the potency test. As a result, the nanocarriers with an average size of about 250 nm (unloaded) and 493 nm (gentamicin-loaded) were obtained with unimodal distribution and a notable polydispersity index (≤0.3). The drug loading efficiency was between 28 and 32%. The gradual and sustained releases (∼90%) of gentamicin were achieved in 24 h. The MIC and potency test showed no significant decrease in the antibacterial activity of gentamicin-loaded nanoparticles. The outcomes demonstrated that the optimised chitosan nanogels prepared in this study can be considered as a suitable carrier for a controlled release system.