A layered algorithm of grouping search is proposed for the problem of the route with multiple restrictions based on earthquake rescue. Firstly, rescuers are divided into groups based on search width and then according to the principle of exactly dividing search region; secondly, tasks are assigned based on the principle of balanced region division; finally, the center of each square is regarded as the points in the graph and the search problem is turned into an approximate Hamiltonian problem, in which a path is designed to start from the beginning point and end at the midpoint of one line, the problem that the corners cannot be completely covered is modified with the extended “reentrant search”, and the balance of search time in groups is strengthened with the strategy “halfway conversion”. Thus we can get a search path with the shortest distance and most balanced search time for each person. The route has the search efficiency as high as 95% and can be seen as the optimal approximate solution, which improves previously known results.