The research on two-wheeled inverted pendulum (TWIP) mobile robots has been ongoing in a number of robotic laboratories around the world. In this paper, we consider a robust controller design for the TWIP mobile robot driving on uniform slopes. We use a 2 degree-of-freedom (DOF) model which is obtained by restricting the spinning motion in a 3 DOF motion dynamic equation. In order to design the robust controller guaranteeing stability of the TWIP mobile robot driving on inclined surface, we propose a sliding mode control based on the theory of variable structure systems and design a sliding surface using the theory of the linear quadratic regulation (LQR). For simulation, the dynamic model of the TWIP mobile robot is constructed using Mathworks` Simulink and the sliding mode control is also implemented using Simulink. From simulation results, we show that the proposed controller effectively controls the TWIP mobile robot driving on slopes.