Researchers proposed many algorithms to stabilize humanoid robots for walking. Most of them used COG/ZMP (center of gravity / zero moment point) methods to stabilize the robot, but the floor condition must be known in advance for generating COG/ZMP trajectories. In order to achieve real-time stabilizing control in rugged terrain, we proposed an ankle stabilizing controller, which modifies the ankle motion to strengthen walking stability. In our algorithm, the controller could prevent the robot from falling down dynamically. When standing upright statically, the robot could resist external forces in considerable magnitude under the guidance of the ankle stabilizer. While walking, the robot could safely step on the unknown rugged terrain, and pass through it under the compensation of the ankle stabilizer. With the ankle stabilizer, humanoid robot could also robustly conquer those little level differences, invisible by the vision system of humanoid robot but possibly cause the robot to fall down. Therefore, the ankle stabilizer could not only enhance robot's mobility, but also pave the way for most walking motion planning under uneven ground condition.