In this paper, we propose a reversible data hiding algorithm for grayscale images. Specifically, our algorithm is based on the histogram modification technique. The premise of this algorithm is that a histogram is constructed from the differences between each pixel and its neighbors. In the data embedding process, a modified histogram shifting scheme is used to embed a secret message into the pixels whose pixel difference is located at the peak value within the histogram. Experimental results show that our algorithm can achieve higher embedding capacity and imperceptible distortion. Performance comparisons with other existing algorithms are also provided to demonstrate the feasibility of our proposed algorithm in reversible data hiding.