[en] Wireless sensor networks (WSNs) are one of the fundamental infrastructures for Internet of Things (IoTs) technology. Efficient energy consumption is one of the greatest challenges in WSNs because of its resource-constrained sensor nodes (SNs). Clustering techniques can significantly help resolve this issue and extend the network’s lifespan. In clustering, WSN is divided into various clusters, and a cluster head (CH) is selected in each cluster. The selection of appropriate CHs highly influences the clustering technique, and poor cluster structures lead toward the early death of WSNs. In this paper, we propose an energy-efficient clustering and cluster head selection technique for next-generation wireless sensor networks (NG-WSNs). The proposed clustering approach is based on the midpoint technique, considering residual energy and distance among nodes. It distributes the sensors uniformly creating balanced clusters, and uses multihop communication for distant CHs to the base station (BS). We consider a four-layer hierarchical network composed of SNs, CHs, unmanned aerial vehicle (UAV), and BS. The UAV brings the advantage of flexibility and mobility; it shortens the communication range of sensors, which leads to an extended lifetime. Finally, a simulated annealing algorithm is applied for the optimal trajectory of the UAV according to the ground sensor network. The experimental results show that the proposed approach outperforms with respect to energy efficiency and network lifetime when compared with state-of-the-art techniques from recent literature.