FLAG® tag (DYKDDDDK) is a small epitope peptide employed for the purification of recombinant proteins such as immunoglobulins, cytokines, and gene regulatory proteins. It provides superior purity and recoveries of fused target proteins when compared to the commonly used His-tag. Nevertheless, the immunoaffinity-based adsorbents required for their isolation are far more expensive than the ligand-based affinity resin used in combination with the His-tag. In order to overcome this limitation we report herein the development of molecularly imprinted polymers (MIPs) selective to the FLAG® tag. The polymers were prepared by the epitope imprinting approach using a four amino acids peptide, DYKD, including part of the FLAG® sequence as template molecule. Different kinds of magnetic polymers were synthesised in aqueous and organic media also using different sizes of magnetite core nanoparticles. The synthesised polymers were used as solid phase extraction materials with excellent recoveries and high specificity for both peptides. The magnetic properties of the polymers confer a new, effective, simple, and fast method in the purification using FLAG® tag.