The most widespread cooling techniques based on gas compression/expansion encounter environmental problems. Thus, tremendous effort has been dedicated to develop alternative cooling technique and search for solid state materials that show large caloric effects. An application of pressure to a material can cause a change in temperature, which is called the barocaloric effect. Here we report the giant barocaloric effect in a hexagonal Ni2In-type MnCoGe0.99In0.01 compound involving magnetostructural transformation, Tmstr, which is accompanied with a big difference in the internal energy due to a great negative lattice expansion(∆V/V ~ 3.9%). High resolution neutron diffraction experiments reveal that the hydrostatic pressure can push the Tmstr to a lower temperature at a rate of 7.7 K/kbar, resulting in a giant barocaloric effect. The entropy change under a moderate pressure of 3 kbar reaches 52 Jkg-1K-1, which exceeds that of most materials, including the reported giant magnetocaloric effect driven by 5 T magnetic field that is available only by superconducting magnets.