An interplay between 4-bromo-and 4-iodo-5-nitrophthalonitriles (XNPN, X = Br or I) and any one of the azines (pyridine 1, 4-dimethylaminopyridine 2, isoquinoline 3, 4cyanopyridine 4, 2-methylpyridine 5, 2-aminopyridine 6, quinoline 7, 1-methylisoquinoline 8, and 2,2'-bipyridine 9) proceeds differently depending on steric and electronic effects of the heterocycles. Sterically unhindered azines 1-3 underwent N-arylation to give the corresponding azinium salts (characterized by 1 H and 13 C{H} NMR and high-resolution ESI-MS). In contrast, azines 4-9 with sterically hindered N atoms or bearing an electron-withdrawing substituent, form stable co-crystals with XNPN, where two interacting molecules are bound by halogen bonding. In all obtained cocrystals, X•••N structure-directed halogen bonds were recognized and theoretically evaluated including DFT calculations (PBE0-D3/def2-TZVP level of theory), QTAIM analysis, molecular electrostatic potential surfaces, and noncovalent interaction plot index. Estimated energies of halogen bonding vary from À 7.6 kcal/mol (for 6 • INPN) to À 11.4 kcal/mol (5 • INPN).