This work proposed the developed of thermo‐sensitive and magnetic molecularly imprinted polymer for the extraction of omeprazole from the human urine and pharmaceutical samples. The ethylene glycol dimethacrylate and N, N′‐methylenediacrylamide were used as the cross‐linkers, poly (N‐vinylcaprolactam) as a thermo‐sensitive monomer, and omeprazole as a template to create molecularly imprinted polymer. The maximum sorption capacity was achieved at a contact time of 15 min, pH=7, temperature of 25 °C, and initial concentration of 20 μg mL−1. Under these conditions, the omeprazole in human urine and pharmaceutical samples were determined by high performance liquid chromatography with ultra‐violet detection. The obtained polymer was characterized by different techniques. The equilibrium data were fitted well with Langmuir isotherm model.The limit of quantification and limit of detection were 0.24 and 0.061 μg mL−1, respectively. Relative standard deviations for inter‐day and intra‐day precisions were 1.78 % and 1.51 %, respectively. Omeprazole extraction recoveries from samples exceeded 93 %.