The applications of Wireless Sensor Networks are seriously constrained by energy supply. So how to prolong the network lifetime is an important and challenging issue, which is the focus of designing the WSNs routing protocol. We propose an approach of the wireless sensor network routing protocol based on ant colony optimization. The ACO approach consider not only the path delay but also the node energy and the frequency a node acting as a router to achieve a dynamic and adaptive routing, which can effectively balance the WSNs node power consumption and increase network lifetime as long as possible. Simulation results have show the ACO routing protocol significantly improves the network lifetime.