Sensors are regarded as significant components of electronic devices. In most applications of wireless sensornetworks (WSNs), important and critical information must be delivered to the sink in a multi-hop and energy-efficientmanner. Inasmuch as the energy of sensor nodes is limited, prolonging network lifetime in WSNs is considered to bea critical issue. In order to extend the network lifetime, researchers should consider energy consumption in routingprotocols of WSNs. In this paper, a new energy-efficient routing protocol (EERP) has been proposed for WSNs usingA-star algorithm. The proposed routing scheme improves the network lifetime by forwarding data packets via theoptimal shortest path. The optimal path can be discovered with regard to the maximum residual energy of the nexthop sensor node, high link quality, buffer occupancy and minimum hop counts. Simulation results indicate that theproposed scheme improves network lifetime in comparison with A-star and fuzzy logic(A&F) protocol.