A multi‐template molecularly imprinted photocatalyst based on Black TiO2 was used for selective and simultaneous adsorption and degradation of Non‐steroidal anti‐inflammatory drugs (NSAIDs) under LED irradiation from aqueous solutions. diclofenac (DCF) and ibuprofen (IBP) were chosen as the target chemicals and the performance of the Black TiO2‐MIP nanocomposite in removing these pollutants was investigated. The imprinting procedure was confirmed by characterization tests of the nanocomposite. The synthesized mesoporous nanocomposite exhibited excellent fit with the pseudo‐second‐order kinetic model (R2 ≥ 0.99). Moreover the experimental data demonstrated a good fit with the Langmuir isotherm model (R2 = 0.99). The findings imply that the binding sites are homogeneous and indicate monolayer chemical adsorption on the adsorbent. Toxicity assessment of targeted chemicals and their by‐products, worked out using the Ecological Structure–Activity Relationships (ECOSAR) program, revealed a significant decrease in the toxicity of the target compounds during photocatalytic degradation. In addition, the use of Black TiO2‐MIP nanocomposite in the cartridge structure led to notable removal efficiencies, 98.7% and 97.6% for DCF and IBP, respectively. The findings also provided evidence that the use of Black TiO2‐MIP in the cartridge structure not only facilitated the removal of target pollutants but also addressed challenges related to the collection and separation of the nanocomposite from the aqueous solution. The results implied that the integration of molecular imprinting and photocatalysis processes exhibits high effectiveness in the simultaneous and selective removal of contaminants. This approach holds promise as an effective solution for addressing the challenge of drug residues in aqueous samples.