A two-wheeled robotic wheelchair (TWRW) has a better manoeuvrability than a conventional four-wheeled wheelchair. However, it is not statically stable near the upright posture or a posture desired by the rider, and an active stability controller is required. Stability control becomes more challenging when a TWRW is also required to move in a desired direction. To rely on wheels' motions to achieve both stability and direction control tend to impose a large burden on the wheels' driving motors or other types of actuators in terms of their driving torque and power consumption. Various disturbances in the system also affect the performance of the controller. To solve these problems, this paper presents a stability and direction controller based on the motion of a pendulum-like movable mechanism added to assist the wheels to produce control actions. The dynamic model of the TWRW is established through the Euler-Lagrange formulation in which the disturbances caused by model uncertainties and rider's motion are considered. A robust second-order sliding mode control is then developed for the stability and the direction control of a TWRW. Simulation results are presented to validate the effectiveness of the proposed method. INDEX TERMS Two-wheeled robotic wheelchair, stability control, direction control, added movable mechanism, second-order sliding mode control.