In query–based wireless sensor networks (WSNs), a hotspot may cause the heavy power consumption due to the frequent query request among nodes for specific events. A hotspot leads to the fluctuation of traffic flow and the unbalanced energy among those neighbouring nodes. To mitigate the hotspot phenomenon, a target region with the fluctuation of traffic flow around the hotspot to handle the unbalance traffic load is constructed first. In this paper, we propose two algorithms for mitigating query hotspots, distance–based mobile agent selection (DMAS) and greedy–based mobile agent selection (GMAS). The boundary node equipped with mobile agent is called limb node that moves around the hotspot. Experiment results include the comparisons of hotspot rate and total energy consumption, hotspot traffic rate with different RT value query frequency, and the effect of the hotspot overlay avoidance. The results show that DMAS and GMAS can mitigate the traffic rate of hotspot about 50%, effectively.