In this paper, the novel surface molecularly imprinted polymers based on dendritic-grafting magnetic nanoparticles were developed to enrich and separate glibenclamide in health foods. The density functional theory method was used to give theoretical directions to the synthesis of molecularly imprinted polymers. The polymers were prepared by using magnetic nanoparticles as supporting materials, methacrylic acid as the functional monomer, and ethylene glycol dimethacrylate as the cross-linker. The characteristics of magnetic nanoparticles and polymers were measured by transmission electron microscope and SEM, respectively. The enriching ability of molecularly imprinted polymers was measured by Freundlich Isotherm. The molecularly imprinted polymers were used as dispersive SPE materials to enrich, separate, and detect glibenclamide in health foods by HPLC. The average recoveries of glibenclamide in spiked health foods were 81.46–93.53% with the RSD < 4.07%.