In this paper, a novel disturbance observer (DO) for the Mobile Wheeled Inverted Pendulum (MWIP) system is proposed. A choice method of optimal gain matrices is also proposed for a given robust gain, which can improve the estimation precision of the DO. Combining the proposed DO and Sliding Mode Control (SMC), a new sliding mode velocity control method is designed for the MWIP system. The convergency of the DO is proved by Lyapunov theorem. And the stability of the closed-loop system is achieved through the appropriate selection of sliding surface coefficients. The effectiveness of all proposed methods is verified by simulation results for the MWIP system.