A cadmium (II) coordination polymer, namely {[Cd 5 (L n ) 6 Cl 4 ]·2H 2 O} n (1, HL n =1-methyl-2-(3H-[1–3]triazol-4-yl)-1H-benzoimidazole), has been constructed from in situ generated HL n under hydrothermal condition. The unsuccessful synthesis of 1 under similar synthesis condition using HL n as reactant suggests the in situ reaction is crucial for the assembly of the compound. Crystallography study reveals that 1 processes layer structure in which chains of [Cd 3 (L n ) 4 Cl 4 ] 2− were connected by a pair of Cd ions. These layers further stack in an AAA model to form a 3D supramolecular framework and hydrogen bonding as well as π–π interaction were formed between adjacent layers to stabilize the framework. TGA indicates that 1 is highly thermally stable up to about 380°C. The luminescence of 1 in the solid state which may be assigned to intraligand transition shows a blue shift of 16nm compared to that of HL n ·HCl.