In disaster environments, due to the destruction of local communication infrastructures, wireless mobile agents (robots) are employed to search and deploy to establish ad hoc networks. With the guidance of the network, first responders can efficiently perform tasks in disaster environments. However, due to the uncertainties and complexities of disaster environments and the limited capabilities of wirelessmobile agents, it is challenging to apply wireless mobile agents to disaster environments in both theory and practice. To this end, a task-based wireless mobile agents search and deployment approach is proposed for ad hoc network establishment in disaster environments. The proposed approach consists of a search module and a deployment module. The search module enables wireless mobile agents to efficiently move and collect information in an unknown and complex disaster environment. The deployment module enables wireless mobile agents to find suitable deployment locations based on the collected information. The ad hoc networks established by the proposed approach can guarantee the communications of wireless mobile agents in ad hoc networks. In addition, it can cover the maximum number of tasks and maximum size of area in the disaster environment. The experimental results demonstrate the advantages of the proposed approach in terms of wireless mobile agents search and deployment for ad hoc network establishment in disaster environments.