With the combined surface imprinting technique and immobilized template strategy, molecularly imprinted magnetic nanoparticles were successfully prepared and coupled with high-performance liquid chromatography to selectively separate and determine gallic acid from the pomegranate rind. On the surface of carboxyl-functionalized magnetic nanospheres, thin imprinting shells were formed using dopamine as monomer and crosslinker. The characteristics, polymerization conditions, and adsorption performances of the resultant nanomaterials were investigated in detail. In addition of good crystallinity, satisfactory magnetism, and uniform morphology of the obtained polymers, they had rapid binding kinetics, high adsorption capacity, and favorable reusability. In the mixed solution of four hydroxybenzoic acids, the prepared nanomaterials have an excellent selectivity to gallic acid with an imprinting factor of as high as 17.5. Therefore, the polymers have great potentials in specific extraction and enrichment of gallic acid from the complex natural resources.