Due to recent advances in wireless communication technologies, there has been a rapid growth in wireless sensor networks research during the past few decades. Many novel architectures, protocols, algorithms, and applications have been proposed and implemented. The efficiency of these networks is highly dependent on routing protocols directly affecting the network life-time. Clustering is one of the most popular techniques preferred in routing operations. In this paper, a novel energy efficient clustering mechanism, based on artificial bee colony algorithm, is presented to prolong the network life-time. Artificial bee colony algorithm, simulating the intelligent foraging behavior of honey bee swarms, has been successfully used in clustering techniques. The performance of the proposed approach is compared with protocols based on LEACH and particle swarm optimization, which are studied in several routing applications. The results of the experiments show that the artificial bee colony algorithm based clustering can successfully be applied to WSN routing protocols.