-Wireless sensor networks (WSNs) have received significant attention recently. Wireless sensors are deployed to achieve network load balancing, prolonging network lifetime, and improving network coverage. To achieve these goals, energy efficiency directly affects battery life and thus is a critical design parameter for WSNs. In this paper, we propose an Network Coding based Energy Efficient Routing Algorithm in WSNs to prolong lifetime (NC-ER), which is able to dramatically prolong network lifetime while effectively improve energy efficient. We also present an algorithm for deciding the network lifetime scheme for a node to further improve energy efficient by minimizing redundant packet transmissions. Simulation results show that, with the proposed NC-ER Algorithm in WSN throughput, network lifetime and energy efficiency can be improved in most of cases. It is an available approach to routing decision.