The wireless sensor network has become a popular research topic in recent years. Advances in sensor node technology have enabled the rapid development of wireless sensor networks that can be used in various application areas, such as healthcare, the military, and the environment. Although there are many invaluable applications for wireless sensor networks, there are also a lot of emerging problems and challenges that need to be solved, at the same time. The biggest problem is how to efficiently use energy resources to prolong the overall system lifetime of such highly energy-constrained wireless sensor networks. Our solution to this problem is to design an energy-efficient routing algorithm. We use a mathematical programming technique to formulate the issue as a combinatorial optimization problem, where the objective function is to maximize the system lifetime. To make it more realistic, we modify the definition of the system lifetime by considering the coverage constraint and time-critical demand of some applications. We can then derive a better routing algorithm to obtain a maximal system lifetime of a sensor network that is much closer to the real environment. Because the optimization problem itself is highly complicated and difficult, we use Lagrangean Relaxation method to solve it. Due to the method’s remarkable properties, we are able to solve this complicated optimization problem efficiently, and obtain an energy-efficient routing algorithm at the same time.