Clustering sensor nodes is an effective method in designing routing algorithms for Wireless Sensor Networks (WSNs), which improves network lifetime and energy efficiency. In clustered WSNs, cluster heads are the key nodes, they need to perform more tasks, so they consume more energy. Therefore, it is an important problem to select the optimal cluster heads. In this paper, we propose a clustering algorithm that selects cluster heads using an improved artificial bee colony (ABC) algorithm. Based on the standard ABC algorithm, an efficient improved ABC algorithm is proposed, and then the network cluster head energy, cluster head density, cluster head location and other similar factors are introduced into the improved ABC algorithm theory to solve the clustering problem in WSNs. In the network initialization period, all nodes have the same energy level, the improved ABC algorithm is used to optimize fuzzy C-means clustering to find the optimal clustering method. We also propose an energy-efficient routing algorithm based on an improved ant colony optimization for routing between the cluster heads and the base station. In order to improve energy efficiency and further improve network throughput, in the stable transmission phase, we introduce a polling control mechanism based on busy/idle nodes into intra-cluster communication. The performance of the proposed protocol is evaluated in several different scenarios. The simulation results show that the proposed protocol has a better performance compared to a number of recent similar protocols. INDEX TERMS WSN, clustering, energy efficiency, network lifetime, high throughput, polling, routing algorithm, artificial bee colony