The reaction of iminodiacetic acid with Ln2O3 (Ln = Dy, Ho, Er, Yb) under hydrothermal conditions generate a series of 3D lanthanide-based coordination polymers, in which, the iminodiacetic acid (IDA) was transformed into a 2,5-diketopiperazine-1,4-diacetate.