In this study, the performances of a synthesized Molecularly Imprinted Polymer (MIP) and a commercial Solid Phase Extraction (SPE) cartridge were compared in terms of the removal efficiency and quantification of pharmaceutical compounds in wastewater samples. Concentration analysis of Emtricitabine, Tenofovir, Naproxen, Diclofenac, Ibuprofen, and Efavirenz was conducted in influent, primary effluent, secondary effluent, and post-chlorination water samples using liquid chromatography-UV detection. Regressions analysis revealed high linearity (R2 values from 0.9980 to 0.9999) for the compounds, alongside recoveries ranging from 90.9% to 100%. The method detection limits (MDLs) were also determined. Removal efficiencies were computed, with Naproxen and Ibuprofen demonstrating complete removal (100%), while other compounds displayed different of removal efficiency levels. The MIP was found to perform slightly better than traditional SPE cartridges in terms of selectivity, efficiency, and overall performance. This study provides valuable insights into the concentrations of target compounds at various treatment stages, emphasizing the importance of choosing extraction cartridges in wastewater treatment processes.