Stereoselective self-sorting of koneramines and thiokoneramines, which are N3 ligands, evolved from the system of pyridine-2-carboxaldehyde, mono-N-substituted ethylenediamine, primary alcohol or thiol, is observed when metal ions such as Ni(ii), Cu(ii), Zn(ii) and Cd(ii) are added as external stimuli to isolate the emergent molecule.