A cyclic network of four intramolecular C–I…N interactions is shown to bind Na+ and Ca2+ with corresponding binding energies of 57 and 175 kcal/mol, respectively. The halogen-bonded network is built by connecting four molecules of 2-iodoimidazole with acetylene and ethylene as convenient linkers. 2-iodoimidazole provides both the halogen bond donor and the halogen bond acceptor moieties. Each of the four iodine atoms participates in the binding of the metal ion as indicated by the presence of bond paths connecting the metal ion with each one of the halogen atoms in the host, and orthogonal to the C–I…N interactions. A similar intermolecular network of C–I…N interactions is also found to form by the interactions of four 2-iodoimidazole molecules. In contrast to its intramolecular counterpart, the intermolecular C–I…N network is at least partly destroyed upon metal-ion binding as the metal ion competes somewhat successfully for the lone pair of the acceptor nitrogen atoms.