Wireless sensor networks have gained worldwide attention in recent years due to the advances made in wireless communication. Unequal energy dissipation causes the nodes to fail. The factors causing the unequal energy dissipation are, firstly, the distance between the nodes and base station and, secondly, the distance between the nodes themselves. Using traditional methods, it is difficult to obtain the high precision of solution as the problem is NP hard. The routing in wireless networks is a combinatorial optimization problem; hence, genetic algorithms can provide optimized solution to energy efficient shortest path. The proposed algorithm has its inherent advantage that it keeps the elite solutions in the next generation so as to quickly converge towards the global optima also during path selection; it takes into account the energy balance of the network, so that the life time of the network can be prolonged. The results show that the algorithm is efficient for finding the optimal energy constrained route as they can converge faster than other traditional methods used for combinatorial optimization problems.