Recently more and more research interest focuses on the energy efficient routing in mobile ad hoc networks. There are many existing such routing algorithms, but in this paper, a new efficient routing algorithm is presented and it is different from other existing ones. In this paper, priority is added to the existing routing algorithm according to the residual energy of the nodes. Lower residual energy means higher priority and the nodes with higher priority are less likely to forward the packets to other nodes so as to protect the nodes of lower energy and make the lifetime of the network longer. The algorithm does not need any global information of the networks and only a little modification has been done to the existing algorithm, so it is practical to be implemented. Simulation with NS-2 is done and the result shows that the algorithm is efficient.