Energy consumption, cost of routing and latency are the most important problems for routing in WSNs .This paper presents an ant colony optimization based routing algorithm that take into account QoS metrics such as energy, distance and latency. The simulations indicate that the proposed algorithm obtains more balanced transmission among the nodes, reduce the average energy consumption of the routing, extends the network lifetime and reduces the average cost of routing and latency.