The ineffectiveness of traditional wastewater treatment procedures to completely remove them results in their release into the environment. There is a pressing need to remove pharmaceuticals effectively using different methods. Using affordable technologies while maintaining standards for health and safety is one of the main problems in the wastewater treatment industry. In this study, a cost effective and highly selective molecularly imprinted polymers (MIPs) was combined with silver nanoparticles (AgNPs) capped with platanus acerifolia (PL) and moringa oleifera (MO) for selective removal of sulfamethoxazole, nevirapine and ibuprofen in wastewater. Moreover, the study focused on adsorption parameters, including temperature, pH, adsorbent dosage, adsorbate concentration, and contact time. The transmission electron microscopy revealed that MO/PL‐AgNPs and MO/PL‐nanoMIPs are nanosized and spherical. XRD confirmed the formation of AgNPs onto MO/PL‐AgNPs and MO/PL‐nanoMIPs surface. Adsorption isotherms for MO/PL‐AgNPs and MO/PL‐nanoMIPs fitted with the linear Langmuir model. However, high Qmax values were obtained for MO/PL‐nanoMIPs compared to MO/PL‐AgNPs. The linear pseudosecond order second‐order kinetic model best fitted on MO/PL‐nanoMIPs, while the thermodynamics revealed that the adsorption process was spontaneous and endothermic. The findings revealed for the first time the high efficiency of MO/PL‐nanoMIPs to remove the selected target pharmaceuticals in wastewater.