Highly selective separation of yttrium (and lanthanides) is of interest for the design of radiopharmaceuticals, and an efficient method based on the ion-imprinting concept is proposed here. The synthesis and structural, thermodynamic and photophysical characterization of complexes of trivalent yttrium and lanthanides with two new vinyl derivatives of dipicolinic acid, HL1 and L2, are described. The feasibility of using ion-imprinted resins for yttrium and lanthanide separation is demonstrated. The resins were obtained by copolymerization with styrene and divinylbenzene and subsequent acid treatment to remove the metal ion. High-resolution Eu luminescence experiments revealed that the geometry of the complexation sites is well preserved in the imprinted polymers. The ion-imprinted polymer based on HL1 proved to be particularly well adapted for yttrium extraction, having a sizeable capacity (8.9 +- 0.2 g/mg resin) and a fast rate of extraction (t1/2 = 1.7 min). In addition, lighter and heavier lanthanide ions are separated. Finally, the resin displays high selectivity for yttrium and lanthanide cations against alkali and alkaline earth metals. For instance, in a typical experiment, 10 mg of yttrium was extracted from 5 g of milk ash sample by 2 g of the resin. The good separation properties displayed by the resin based on HL1 open interesting perspectives for the production of highly pure 90Y and radiolanthanides for medical applications, and for trace analysis of these radiochemicals in food and in the environment.