A novel intelligent photo‐controlled molecularly imprinted polymers were synthesized, based on the magnetic core‐shell structure, with 4‐[(4‐methacryloyloxy) phenylazo] benzenesulfonic acid as the functional monomer and ethylene glycol dimethyl acrylate as the cross‐linking agent. Subsequently, a series of light‐controlled enrichment‐release performance showed that it only took about 30 and 10 min to reach the equilibrium photosensitive characteristic peak, respectively. The photo‐controlled polymers could intelligently select target molecules, the maximum adsorption capacity for dibutyl phthalate was 3.88 mg/g. However, the adsorption capacity for its structural analogue dicyclohexyl phthalate was only 0.88 mg/g. The Freundlich and Langmuir isothermal equations were discussed for the specific enrichment process. Finally, the photo‐controlled molecularly imprinted polymers were successfully applied to the selective detection of dibutyl phthalate, with the recovery rate of 95.4–98.4%. It could be used for the analysis of trace dibutyl phthalate in actual samples.