To prolong network lifetime, lifetime maximization routing based on genetic algorithm (GALMR) for wireless sensor networks is proposed. Energy consumption model and node transmission probability are used to calculate the total energy consumption of nodes in a data gathering cycle. Then, lifetime maximization routing is formulated as maximization optimization problem. The select, crosss, and mutation operations in genetic algorithm are used to find the optimal network lifetime and node transmission probability. Simulation results show that GALMR algorithm are convergence and can prolong network lifetime. Under certain conditions, GALMR outperforms PEDAP-PA, LET, Sum-w and Ratio-w algorithms.