In a bidirectional automated guided vehicle (AGV) system, it is essential to allocate routes to AGVs to avoid deadlocks. However, avoiding deadlocks is more challenging in dynamic environments where AGVs are continuously assigned tasks and thus operate simultaneously. This paper proposes a deadlock prevention method for dynamic environments. The proposed method combines the active path reservation method, which restricts the directions of the paths of some moving AGVs, and the dynamic Dijkstra algorithm, which finds the shortest route according to the path reservation status. Apart from the Dijkstra algorithm, the proposed method is compatible with other routing algorithms, such as the Q-learning-based route algorithm; therefore, the proposed method enables the development of more efficient transport systems that account for AGV congestion. The efficiency and scalability of the proposed method were verified using Applied Materials AutoMod (version 14.0) simulation software.