The present study examined the direct esterification of terephthalic acid (TPA) with allyl alcohol (AA) on the graphene oxide (GO) surface in the presence of p-toluene sulfonic acid (PTSA) catalyst. Then, the surface of GO-TPAA was modified through polymerization reaction with 2,2’-azobisisobutyronitrile (AIBN) as a reaction initiator. The developed polymer was tested successfully as a nanocarrier for the metronidazole (MNZ) drug delivery. The resulting polymer was characterized by Fourier-transform infrared spectroscopy (FTIR), scanning electron microscopy (SEM), energy dispersive X-Ray (EDX), Brunauer-Emmett-Teller (BET), X-ray diffraction (XRD), and thermogravimetric analysis (TGA). The parameters were optimized by response surface methodology (RSM) based on the central composite design (CCD) experimental design. The maximum adsorption (93.31%) was obtained at pH = 5, contact time of 15 min, and MNZ concentration of 15 mg L− 1. Analysis of variance (ANOVA) study proposed that the obtained equation for the adsorption of the MNZ is quadratic and it is significant for the model. The drug release behavior indicated that the amount of MNZ release from nanocarrier was significantly pH dependent. The released data were fitted into different kinetic release model equations for determining the best-fit release model for the nanocarrier. The adsorption kinetic data best fitted the pseudo-second-order model with a coefficient of determination (R2) of 0.9999. The adsorption process was endothermic, following the Langmuir isotherm model (R2 = 0.9956). MNZ release was studied in vitro using stimulated gastric fluid and stimulated intestinal fluid. The proposed nanoadsorbent can be useful for the rapid and efficient adsorption of the drug.