As a highly dense area for passengers, the airport departure hall is particularly characterized by the easy gathering of passengers, irregularity, and difficulty in command, which has become a high incidence of emergencies. For the evacuation problem in case of emergencies, the vast majority of passengers randomly choose the shortest path from the exit to escape, which will lead to congestion at some nodes and prolonging of the evacuation time. Therefore, this study proposes a better evacuation method considering the dynamic change in the spatiotemporal congestion of passengers. First, this paper constructs an evacuation network diagram for the departure hall of the Shenzhen Bao’an International Airport terminal building, simplifies the evacuation process into point-to-point evacuation, and proposes a time-varying network algorithm to optimize the emergency evacuation of the airport. Second, on the premise of obtaining the number and dynamic distribution of passengers in each area in real time, a linear programming model with the shortest evacuation time as the optimization objective is established, and the current optimal evacuation path of passengers is dynamically calculated. Finally, the two evacuation methods, random evacuation and evacuation, based on a time-varying network algorithm are simulated and analyzed by AnyLogic software. The results show that the evacuation scheme based on the time-varying network algorithm can effectively relieve the passenger congestion of some evacuation paths and safety exits. The evacuation time is reduced by 74 s, the evacuation efficiency is improved by 14%, passenger congestion at some evacuation routes and safety exits can be effectively relieved, and the global optimization of the emergency evacuation of passengers is achieved.