Wireless sensor networks (WSNs) and their various applications become more remarkable recently. Due to the energy resource impediments, the energy efficiency is an effective factor in such networks. Therefore, the researches have been directed to improve and extend network lifetime. This paper proposes a routing protocol for the applications of WSN. The proposed protocol based on the Power-Efficient Gathering in Sensor Information Systems (PEGASIS) protocol by using improved methods. The proposed protocol called PEG-DA. PEG-DA indicates to PEGASIS protocol consolidated with Dragonfly Algorithm (DA) that improves the energy consumption of WSN by selecting the optimal chain to the base station. At the nodes distribution phase, the study adopted three methods such as Random, Firefly Algorithm and Control considering that the base station is static to attain the best efficiency of consumption energy. The network area is divided into five regions according to the applied method to mitigate the load of transmitting data and reducing the communication cost from nodes to the base station. The simulation based on Matlab 2019 simulator to conduct the experiment and the results show the proposed approach perfection in the state of remaining energy along with significant enhancement in relating to network lifespan, and an effective delay reduction in a comparison with the original PEGASIS protocol.