Today, environmental pollutants pose a threat to human societies and all living organisms, which is why they have attracted the attention of environmental researchers. In this study, in order to remove pharmaceutical contaminants Naproxen and Amoxicillin from aqueous media with SiO2 nanoparticles based on Agar and Chitosan was investigated. The study of structural properties, physical and chemical characterization of synthesized nanocomposite was investigated by FTIR, XRD, TEM, FE-SEM, DLS and EDX analyzes. In addition, the role of parameters affecting the removal of pharmaceutical contaminants such as solution pH, contact time, contaminant concentration and temperature were studied. Nanocomposites prepared from Agar and Chitosan showed good performance in absorbing naproxen and amoxicillin. According to the studies performed to remove naproxen, the max adsorption efficiency was obtained at a concentration of 20 mg/l with an absorbent dose of 0.05 g and a pH of 8 and at an optimum temperature of 25 °C and 99% in 15 min. Also, for amoxicillin with nanocomposite prepared with an initial concentration of 20 mg/l and an adsorbent dose of 0.05 g, a time of 10 min, a temperature of 25 °C and a pH of 8, the max removal efficiency of 91.15% was obtained.