The nodes in the wireless sensor network are furnished with restricted and irreplaceable battery power. The continuous sensing, computation, and communication drain out the energy of sensors very quickly. The optimal utilization of the sensor energy has always been a key issue for all the applications in the wireless sensor network. To manage the energy issue of nodes, various approaches were proposed in the past which focused on designing the proper energy management methods. The clustering of sensors is one of the most popular techniques used to manage the energy-related concerns of networks. In this paper, a particle swarm optimization-based energy efficient clustering protocol (PSO-EEC) is proposed to enhance the network lifetime and performance. The proposed protocol uses the particle swarm optimization technique to select the cluster head and relay nodes for the network. The cluster head is selected by employing the particle swarm optimization based fitness function which considers the energy ratio (initial energy and residual energy) of nodes, distance between nodes and cluster head, and node degree to appoint the most optimal node for the cluster head job. For the data transfer to base station, the proposed scheme uses the fitness value based on residual energy of cluster head and distance to base station parameters to nominate the relay nodes for the multi-hop data transfer to the base station. The performance of the proposed protocol is compared with the various existing approaches in terms of different performance parameters such as energy expenditure, network lifetime, and throughput to evaluate its effectiveness. The proposed scheme has improved the lifetime of the network by 238%, 136%, 106%, and 71% as compared to the existing MDCH-PSO, MCHEOR, MOPSO, and HSA-PSO techniques used in the simulation results for the comparison purpose. The stability period of the network in proposed scheme is approximately 396%, 321%, 246%, and 126% more than the existing MDCH-PSO, MCHEOR, MOPSO, and HSA-PSO protocol .