In this study, silver oxide nanoparticles (Ag2O NPs) were generated by synthesizing green leaf extract of Punica granatum and used as adsorbent and used as adsorbent to remove the antibiotic additive sulfamethoxazole (SMX) from an aqueous solution. The chemical composition, surface morphology, and textural properties of the Ag2O NPs were identified using XRD, FTIR, BET/BJH, SEM-EDX, and TEM analyses. For 100 mg L− 1 SMX antibiotic concentration, Ag2O NPs achieved almost complete removal of 98.93% within 90 min by using 0.8 g L− 1 of adsorbent dose and initial solution pH of 4 at a temperature of 308 K. Langmuir model efficiently elucidates the experimental data, which amounts to homogeneous nature of antibiotic adsorption onto the Ag2O NPs. The maximum uptake capacity was 277.85 mg g− 1. Kinetic studies promise a PSO model. The ΔGº and ΔHº values confirm the spontaneity and endothermicity of the adsorption process. The regeneration study shows that the Ag2O NPs can be efficiently reused for up to five cycles. The geometric structures have been optimized and quantum chemical parameters were calculated for the SMX unprotonated (SMX+/−) and protonated (SMX+) using density functional theory (DFT) calculation, indicating that the SMX+/− is reacting more favorably on the surface of Ag2O NPs compared to the SMX+. According to this study, the Ag2O NPs as an excellent potential the adsorbent will be able to have remarkable effects in the treatment of pharmaceutical wastewater.