Humanoid robots are expected to have broad applications due to their biped mobility and human-like shape. To increase the walking speed, it is necessary to increase the power for driving the joints of legs. However, the resulting mass increasing of the legs leads to a rotational slip when a robot is walking fast. In this paper, a 3D three-mass model is proposed, in which both the trunk and thighs are regarded as an inverted pendulum, and the shanks and feet are considered as mass-points under no constraints with the trunk. Then based on the model, a friction constraint method is proposed to plan the trajectory of the swing leg in order to achieve the fastest walking speed without any rotational slip. Furthermore, the compensation for zero-moment point (ZMP) is calculated based on the 3D three-mass model, and the hip trajectory is obtained based on the compensated ZMP trajectory by using the preview control method, thus improving the robot’s overall ZMP follow-up effect. This planning method involves simple calculations but reliable results. Finally, simulations confirm that the rotational slip is avoided while stable and fast walking is realized, with free joints of the waist and arms, which then could be planned for other tasks.