We proposed a walking assistance apparatus for the disabled and elderly people, which is used for gait training and rehabilitation. We used the zero-moment point (ZMP) control method to ensure the stability of the walking assistance apparatus. Since users need to walk on stairs and the distance of every two staircases is invariable, the stride length of the apparatus is supposed to be constant. We compensated ZMP of the apparatus by adjusting the posture and the position of the center of gravity (COG). Thereby, the projection of gravity and inertia force maintain in the support polygon. From simulations, we can adjust the posture of the apparatus and user when instability occurs to prevent the user from stumbling. This method is suitable for walking on flat ground and stairs.