Herein, a biohybrid polymer nanocomposite of carboxylated chitosan-phthalate/SnO2 nanoparticles (CTS-PHA/SnO2) was developed for dye wastewater treatment i.e. removal of basic red 2 (BR2) dye. A study was conducted using response surface methodology (RSM) to analyse the impact of three factors on the adsorption of BR2 dye. These factors were CTS-PHA/SnO2 dosage (0.02–0.08 g), pH (4–10), and time (10–30 min). The CTS-PHA/SnO2 nanocomposite exhibited a BET surface area of 9.08 m2/g. The total pore volume was also determined to be 0.0240 cm3/g, and the mean pore diameter was measured to be 10.61 nm. The CTS-PHA/SnO2 nanocomposite mostly displays polycrystalline properties, as shown by its average crystallite size of 19.85 nm. The kinetics and adsorption isotherms indicate that the Freundlich and pseudo-first-order kinetic models accurately describe the BR2 adsorption by CTS-PHA/SnO2. The findings of the BBD model suggest that the most effective conditions for achieving a high BR2 elimination rate (97.28%) were a pH of 9.5, a CTS-PHA/SnO2 dose of 0.052 g, and a contact time of 30 minutes. The maximum absorption capacity of the CTS-PHA/SnO2 nanocomposite towards BR2 dye was computed to be 465.3 mg/g at a temperature of 25°C. A proposed mechanism for the adsorption of BR2 dye onto the CTS-PHA/SnO2 nanocomposite involves electrostatic interaction, π-π, hydrogen bonding, and n-π stacking interaction. The findings of this study suggest that the CTS-PHA/SnO2 material shows promise as a highly effective bioadsorbent for dye wastewater treatment.