Pedestrian self-organizing movement has played a significant role in evacuation studies and architectural design. For lane formation, a typical self-organizing phenomenon that helps pedestrian system to get more ordered, the majority of following and overtaking behavior models are imprecise and unrealistic compared with pedestrian movement in the real world. In this study, a pedestrian dynamic model considering detailed modelling of the following and overtaking behaviors is constructed, and a measure of lane formation and pedestrian system order based on information entropy is proposed. Simulation and analysis demonstrate that the following and avoidance behaviors are important factors of lane formation. A high tendency of following results in good lane formation. Both non-selective following behavior and aggressive overtaking behavior cause decrease of system order. The most orderly following strategy for a pedestrian is to overtake former pedestrian whose speed is lower than approximately 70% of their own. The influence of the obstacle layout on pedestrian lanes and egress efficiency is also studied with this model. The presence of a small obstacle may not obstruct the walking of pedestrians; in contrast, it may help to improve the egress efficiency by guiding the pedestrian flow and mitigating the reduction of pedestrian system orderliness.