The ligand 3-(2-pyridyl)pyrazol-1-yl acetic acid (HL) has been prepared and the complexes [Ni(L)(N 3 )] n and [Cu(L‘) 2 (H 2 O) 2 ] n [HL‘ = 3-(2-pyridyl)pyrazole] have been synthesised by reaction of HL and NaN 3 with NiCl 2 ·6H 2 O and CuCl 2 ·2H 2 O under hydrothermal condition. Single-crystal X-ray diffraction analysis shows that [Ni(L)(N 3 )] n possesses a 1D infinite chain structure, which further forms a 2D supramolecular framework connected by π···π weak interactions, and [Cu(L‘) 2 (H 2 O) 2 ] n is linked to form a 1D chain by π···π weak interactions, then to a 2D supramolecular structure by weak C–H···O interactions.