The magnetic and structural properties of polycrystalline Co4-xNixNb2O9 (x = 1, 2) have been investigated by neutron powder diffraction, magnetization and heat capacity measurements, and density functional theory (DFT) calculations. For x = 1, the compound crystallizes in the trigonal P (3) over bar c1 space group. Below T-N = 31 K it develops a weakly noncollinear antiferromagnetic structure with magnetic moments in the ab plane. The compound with x = 2 has crystal structure of the orthorhombic Pbcn space group and shows a hard ferrimagnetic behavior below T-C = 47 K. For this compound a weakly noncollinear ferrimagnetic structure with two possible configurations in the ab plane was derived from neutron diffraction study. By calculating magnetic anisotropy energy via DFT, the ground-state magnetic configuration was determined for this compound. The heat capacity study in magnetic fields up to 140 kOe provides further information on the magnetic structure of the compounds.