Dexamethasone-imprinted polymers were fabricated by reversible addition-fragmentation chain transfer polymerization on the surface of magnetic nanoparticles under mild polymerization conditions, which exhibited a narrow polydispersity and high selectivity for dexamethasone extraction. The dexamethasone-imprinted polymers were characterized by scanning electron microscopy, transmission electron microscope, Fourier transform infrared spectroscopy, X-ray diffraction, energy dispersive spectrometry, and vibrating sample magnetometry. The adsorption performance was evaluated by static adsorption, kinetic adsorption and selectivity tests. The results confirmed the successful construction of an imprinted polymer layer on the surface of the magnetic nanoparticles, which benefits the characteristics of high adsorption capacity, fast mass transfer, specific molecular recognition, and simple magnetic separation. Combined with high-performance liquid chromatography, molecularly imprinted polymers as magnetic extraction sorbents were used for the rapid and selective extraction and determination of dexamethasone in skincare cosmetic samples, with the accuracies of the spiked samples ranging from 93.8 to 97.6%. The relative standard deviations were less than 2.7%. The limit of detection and limit of quantification were 0.05 and 0.20 μg/mL, respectively. The developed method was simple, fast and highly selective and could be a promising method for dexamethasone monitoring in cosmetic products.