The structural characterization of molecular assemblies constructed from imidazolyl-containing haloalkenes and haloalkynes is reported. 1-(3-Iodopropargyl)imidazole (2) and 1-(2,3,3-triiodoallyl)imidazole (5) were synthesized from 1-propargylimidazole (1). In the solid state, these wholly organic modules self-assemble through N...I halogen-bonding interactions, thus giving rise to polymeric chains. The N...I interaction observed in 2 (d(N...I)=2.717 A, angle-spherical C(sp)-I...N=175.8 degrees) is quite strong relative to previously reported data. The N...I interaction in 5 (d(N...I)=2.901 A, angle-spherical C(sp2)-I...N=173.6 degrees) is weaker, in accordance with the order C(sp)-X<--base>C(sp2)-X<--base. Compound 5 was found to give a 1:1 cocrystal 4 with morpholinium iodide (6). In the X-ray crystal studies of 4, N...I halogen-bonding interactions similar to those observed in 5 were shown not to be present, as the arrangement of the molecules is governed by two interwoven hydrogen-bonding networks. The first network involves N-H...O interactions between nearby morpholinium cations, and the second network is based on N-H...N hydrogen bonding between morpholinium cations and imidazolyl groups. Both hydrogen-bonding schemes are charge-assisted. Halogen bonding is not completely wiped out, however, as the triiodoalkene fragment forms a halogen bond with an iodide anion in its vicinity (d(I...I)=3.470 A, angle-spherical C(sp2)-I...I=170.7 degrees). X-ray crystal studies of 6 show a completely different arrangement from that observed in 4, namely, N-H...O interactions are not present. In crystalline 6, morpholinium cations are interconnected through C-H...O bridges (d(H...O)=2.521 and 2.676 A), and the NH2+ groups interact with nearby iodide anions (d(H...I)=2.633 and 2.698 A).