Ciprofloxacin it as one of the most widely used antibiotics, making it essential to study its incorporation in pharmaceutical formulations. This study utilized a molecularly imprinted polymer (MIP) composed of styrene and ethylene glycol dimethyl acrylate to optimize the sorbent for ciprofloxacin solid-phase extraction (MISPµE). The MIP generated a maximum adsorption capacity of 6.5247 µmol/g, demonstrating high selectivity sorbent for its template molecule. Calibration curve analysis indicated a concentration value of 30 μmol/mL. The MIP-SPE method was applied to pharmaceutical samples, achieving a detection limit of 0.21 µmol/mL. Drug recovery varied between 91.28 and 96.57 % by employing this method., These outcomes proved the viability of this optimized MIP-SPµE.