We show that the gravitational acceleration can be measured with the matter-wave Ramsey interferometry, by using a nitrogen-vacancy center coupled to a nano-mechanical resonator. We propose two experimental methods to realize the Hamiltonian, by using either a cantilever resonator or a trapped nanoparticle. The scheme is robust against the thermal noise, and could be realized at the temperature much higher than the quantum regime one. The effects of decoherence on the interferometry fringe visibility is caculated, including the mechanical motional decay and dephasing of the nitrogen-vacancy center. In addition, we demonstrate that under the various sources of random and systematic noises, our gravimeter can be made on-chip and achieving a high measurement precision. Under experimental feasible parameters, the proposed gravimeter could achieve 10 −10 relative precision.