For unstructured peer-to-peer networks, one of the methods for improving query performance is informed routing. This paper introduces an ant-like query routing method. This method views query messages as artificial ants, and utilizes pheromone as routing hints which direct transferring query messages to nodes owning more resources. This paper presents generation and update rule of pheromone, routing policy for artificial ants as well. In addition, entering and quitting of nodes is considered. Our method supports high scalability and is suitable for large-scale P2P networks. By adjusting the number of artificial ants dynamically, a better tradeoff between cost and quality could be achieved.