Thiazoline–thiazole hybrid macrocycles were synthesized via head-to-tail cyclooligomerization. The macrocycle consisting of eight heterocyclic subunits displays high binding affinity to the heavy metal toxins Pb2+ and Cd2+.