The influence of the nature of metal ions and reaction conditions on the formation of group IIB metal coordination architectures of a tetrazole ligand, 2-(1H-tetrazol-5-yl)pyrazine (HL), and the luminescent properties of some complexes have been investigated. At room temperature, the reactions of Zn(NO3)2∙6H2O (or ZnCl2) and Cd(NO3)2∙6H2O with HL gave rise to two reported complexes, [M(L)2(H2O)2] (1 and 2, Acta Crystallogr., Sect. C, 2006, 62, m614; Acta Crystallogr., Sect. E, 2006, 62, m2841), respectively. However, under hydrothermal conditions, the same reactions yield 1 and another complex, {[Cd2(L)4](H2O)0.25}n (3), respectively. In both preparation conditions mentioned above, the HL ligand reacts with Hg(OAc)2 (or HgBr2) to give complexes, [Hg(L)2]n (4), [Hg(L)2]n (5) and [Hg(L)Br]n (6) with different structures. 1 and 2 have a similar mononuclear structure and in the crystal structure such molecules are further assembled together to form a 3-D α-Pt topological framework with O–H⋯N hydrogen bonds. 4 possesses a 1-D chain structure, in which the Cd(II) center is six-coordinated, with all coordination sites being occupied by N atoms of the ligands. Furthermore, such chains are interlinked via π⋯π interactions to form a 3-D framework. 4 has a 2-D (6,3) topological structure, in which the Hg(II) center is six-coordinated to six N atoms of L, and the L ligand takes a chelating-bridging mode similar to that in 3. 5 has a 2-D (4,4) topological layer structure with the metal center being six-coordinated, and the six coordination sites are held by N atoms from four L ligands, taking different coordination modes. Moreover, such planes are generated to form a 3-D structure via two kinds of π⋯π interactions. 6 is a 2-D layer with the Hg(II) coordinating to a Br atom and three N atoms of three tetrazole rings from different L ligands. This result shows that the metal ions and reaction conditions have significant influence on the group IIB metal complexes of this multifunctional ligand, and the intramolecular/intermolecular weak interactions are likely to play important roles in the formation of such complexes, especially linking the discrete subunits or low-dimensional entities into high-dimensional frameworks. In addition, the luminescent studies of HL and 1, 2, 3 and 6 indicate that they display blue emissions with different densities in the solid state at room temperature.