Halogen bonding has attracted much attention recently as an important driving force for supramolecular assembly and crystal engineering. Herein, we demonstrate for the first time the formation of a halogen bond-based open porous network on a graphite surface using ethynylpyridine and aryl-halide based building blocks. We found that the electrical stimuli of a scanning tunneling microscopy (STM) tip can induce the formation of a binary supramolecular structure on the basis of halogen bond formation between terminal pyridyl groups and perfluoro-iodobenzene. This electrical manipulation method can be applied to engineer a series of linear or porous structures by selecting halogen bond donor and acceptor fragments with different symmetries, as the directional interactions ultimately determine the structural outcome.