When city emergencies happen, one of the most important tasks of emergency rescue is to find the shortest path to the emergency in shortest time, scientific and rational path plays an important role in improving rescue efficiency. According to the needs of city emergency rescue and basing on the analysis of the classical algorithm for solving the shortest path problem (Dijkstra algorithm), this article discusses an improved algorithm within dynamic restricted searching area which dynamically changes the direction of the search and restricts the searching area. This new method reduces time and space complexity and improves the efficiency of the algorithm. At the end of the article, it improves the practicality and reliability of this improved algorithm by simulation.