PurposeThe purpose of this paper is to propose a bi‐level programming optimization model to reduce traffic congestion of transportation network while evacuating people to safe shelters during disasters or special events.Design/methodology/approachThe previous optimization model for contra flow configuration only considered the character of the manager. However, the traffic condition is not only controlled by managers, but also depended on the root choice of travelers. A bi‐level programming optimization model, which considered managers and evacuees' character, is proposed to optimize the contra flow of transportation network in evacuation during special events. The upper level model aims to minimize the total evacuation time, while the lower level based on user equilibrium assignment. A solution method based on discrete particle swarm optimization and Frank‐Wolfe algorithm is employed to solve the bi‐level programming problem.FindingsIt is found that the bi‐level programming based contra flow optimization model can improve evacuation efficiency and decrease evacuation time 30 per cent or more. With the increase of traffic demand, the evacuation time will decrease significantly by contra flow configuration.Research limitations/implicationsIn the optimization model, the background traffic is ignored for simplification and the contra flow is configured absolutely as 0 or 1, which ensures vehicles do not go back into the evacuation area.Practical implicationsAn efficient optimization model for traffic managers to reduce congestion and evacuation time of evacuation network.Originality/valueThe new bi‐level programming model not only considers managers' character, but also considers evacuees' reaction. The paper is aimed to optimize contra flow for transportation network.