The key component of a wireless sensor network (WSN), the sensor node, has a lot of restrictions. Since sensor nodes must run for a long time, energy is their biggest drawback. Therefore, energy efficiency is a significant highlight in many studies at WSN. A well-known cluster-based technique in the WSN is the Low-Energy Adaptive Clustering Hierarchy (LEACH). However, the selection of cluster heads (CH) in the LEACH does not consider the availability of energy and distance. This article presents a new protocol based on LEACH and Differential Search Algorithm (DSA) to select CHs and Deputy CHs to extend network lifetime. Additionally, the LEACH protocol is used as a comparison to evaluate the functionality of the proposed protocol. The simulation results show that the proposed protocol has a more extended period of stability and network lifetime than LEACH.