To be reversible as a data hiding method, the original content and hidden message should be completely recovered. One important objective of this approach is to achieve high embedding capacity and low distortion. Using predicted errors is very effective for increasing the embedding capacity. Sorting the predicted errors has a good influence on decreasing distortion. In this paper, we present an improved reversible data hiding scheme using upgraded histogram shifting based on sorting the predicted errors. This new scheme is characterized by the algorithm which is able to find the optimum threshold values and manage the location map effectively. Experimental results compared with other methods are presented to demonstrate the superiority of the proposed method.