The contamination of the aquatic environment with antibiotics is among the major and developing problems worldwide. The present study investigates the potential of adsorbent magnetite-chitosan nanoparticles (Fe3O4/CS NPs) for removing trimethoprim (TMP) and sulfamethoxazole (SMX). For this purpose, Fe3O4/CS NPs were synthesized by the co-precipitation method, and the adsorbent characteristics were investigated using XRD, SEM, TEM, pHzpc, FTIR, and VSM. The effect of independent variables (pH, sonication time, adsorbent amount, and analyte concentration) on removal performance was modeled and evaluated by Box–Behnken design (BBD). The SEM image of the Fe3O4/CS adsorbent showed that the adsorbent had a rough and irregular surface. The size of Fe3O4/CS crystals was about 70 nm. XRD analysis confirmed the purity and absence of impurities in the adsorbent. TEM image analysis showed that the adsorbent had a porous structure, and the particle size was in the range of nanometers. In VSM, the saturation magnetization of Fe3O4/CS adsorbent was 25 emu g−1 and the magnet could easily separate the adsorbent from the solution. The results revealed that the optimum condition was achieved at a concentration of 22 mg L−1, a sonication time of 15 min, an adsorbent amount of 0.13 g/100 mL, and a pH of 6. Among different solvents (i.e., ethanol, acetone, nitric acid, and acetonitrile), significant desorption of TMP and SMX was achieved using ethanol. Also, results confirmed that Fe3O4/CS NPs can be used for up to six adsorption/desorption cycles. In addition, applying the Fe3O4/CS NPs on real water samples revealed that Fe3O4/CS NPs could remove TMP and SMX in the 91.23–95.95% range with RSD (n = 3) < 4. Overall, the Fe3O4/CS NPs exhibit great potential for removing TMP and SMX antibiotics from real water samples.