The structural properties of electron-doped compound BaFe1.8Ni0.2As2 are investigated by the synchrotron X-ray powder diffraction at high pressures ranged from 1bar to 24.0GPa at room temperature. The compound BaFe1.8Ni0.2As2 holds a tetragonal structure (space group I4/mmm) at ambient condition. Upon compression, the lattice parameter a first monotonically decreases from ambient pressure to 7.0GPa, then increases till reaching a maximum at 17.8GPa and again further decreases to the maximum pressure in this investigation. The other lattice parameter c exhibits a slow decrease with increasing pressure before 7.0GPa and a rapid reduction after that. This anomalous lattice compression results in a lattice collapse at around 12GPa while the material enters a collapsed tetragonal phase. The Fe-magnetic state change is proposed to account for the structural evolution superconductivity.