Wireless Sensor Networks (WSNs) are vital for collecting data from remote environments. Nevertheless, the limited energy resources of sensor nodes render energy-efficient routing a critical concern for the successful operation of WSNs. To address these concerns, clustering, and routing are essential tasks in WSNs; clustering aims to organize sensor nodes into groups or clusters to minimize energy usage and prolong the network's lifespan. On the other hand, routing involves determining the optimum paths for transmitting data from the source nodes to the destination nodes. Nonetheless, it has been established that the current energy-efficient routing problem is an NP-hard, requiring a trade-off between energy and overall network performance. In this paper, we proposed a Hybrid Whale-Ant Optimization Algorithm (WAOA) for energy-efficient routing in WSNs. The proposed WAOA utilizes the Whale Optimization Algorithm (WOA) to find the suitable cluster head in the predefined search space, while the Ant Colony Optimization (ACO) searches the optimal route from the source cluster sensors to the cluster head within its predefined space. Linear programming construction is employed to formulate optimization problems for cluster head selection and search for the optimal route. The performance analysis demonstrates that the proposed WAOA performs better than MOORP, MMABC, and AZEBR by 5.78 %,16.11 %, and 18.52 %, respectively, in terms of network lifetime.