Abnormal glycan structures are valuable biomarkers for disease states; the development of glycan-specific binders is thereby significantly important. However, the structural homology and weak immunogenicity of glycans pose major hurdles in the evolution of antibodies, while the poor availability of complex glycans also has extremely hindered the selection of anti-glycan aptamers. Herein, we present a new approach to efficiently screen aptamers toward specific glycans with a complex structure, using a glycosylated peptide as a scaffold. In this method, using peptide-imprinted magnetic nanoparticles (MNPs) as a versatile platform, a glycopeptide tryptically digested from a native glycoprotein was selectively entrapped for positive selection, while a nonglycosylated analogue with an identical peptide sequence was synthesized for negative selection. Alternating positive and negative selection steps were carried out to guide the directed evolution of glycan-binding aptamers. As proof of the principle, the biantennary digalactosylated disialylated N-glycan A2G2S2, against which there have been no antibodies and lectins so far, was employed as the target. With the glycoprotein transferrin as a source of target glycan, two satisfied anti-A2G2S2 aptamers were selected within seven rounds. Since A2G2S2 is upregulated in cancerous liver cells, carboxyfluorescein (FAM)-labeled aptamers were prepared as fluorescent imaging reagents, and successful differentiation of cancerous liver cells over normal liver cells was achieved, which demonstrated the application feasibility of the selected aptamers. This approach obviated a tedious glycan preparation process and allowed favorable expose of the intrinsic flexible conformation of natural glycans. Therefore, it holds great promise for developing glycan-specific aptamers for challenging applications such as cancer targeting.