This paper presents a novel humanoid pedestrian model (HPM) incorporating stepping behavior and body rotation. The HPM is composed of two main components: (a) body modeling and (b) gait planning. A pedestrian is represented as a three-dimensional skeleton with 11 degrees of freedom in the body modeling component, which provides a universal approach for explaining the mathematical correlations between joint rotation angles and critical gait parameters such as step length, step width, and projected shoulder width. A framework for designing gaits that accounts for step-synchronization behavior and the effect of body rotation on stepping behavior is offered by the gait planning process. To validate the model, two types of experiments were conducted: nine sets of single-file experiments and 10 sets of bidirectional flow experiments, in which pedestrians walked in a 0.5-m-wide circular corridor and rotated their bodies to avoid collisions. It was suggested by the fundamental diagrams that body rotation reduces the walking speed of a pedestrian and consequently affects the overall flow rate. Furthermore, it was found that pedestrians were more resistant to moving forward in narrow bidirectional flow environments and tend to wait for a larger gap in front to take a longer or faster step. This behavior led to the formation of stop-and-go waves in the narrow-corridor scenario. The simulation results were consistent with the experimental findings in terms of flow-density relationships and the reproduction of stop-and-go waves. Additionally, synchronized steps were detected in the simulation and quantitatively compared with a publicly available dataset. The HPM offers a new perspective on modeling pedestrian dynamics and emphasizes the necessity of accounting for micro-characteristics at the step level in pedestrian models.