A novel approach to freeze the imine exchange process in dynamic combinatorial libraries by Ugi reactions was developed. Macrocyclic oligoimine libraries previously formed and altered by addition of metal templates are efficiently quenched by multiple multicomponent reactions. The approach may be considered as an alternative to the typical reduction with borohydrides and delivers polyazamacrocycles with variable side arms. High dilution is not required to achieve high yields.