The modeling and control of a two-wheeled inverted pendulum (TWIP) is gaining much interest due to the various advancements in hardware and computing technologies. A TWIP system has many advantages and applications. However, it still faces many challenges such as positioning, disturbance rejection, parameter uncertainties, etc. In this paper, a control scheme based on modern control techniques is presented to overcome these issues. Furthermore, an observer-based robust integral sliding mode controller (ISMC) is proposed for the nonlinear TWIP system. Firstly, a robust integral sliding mode controller is designed to tackle short-term and long-term constant and time-varying disturbances as well as issues relating to parameter variation. Secondly, the reduced-order observer is designed to estimate immeasurable states, enabling simplified implementation. It is then applied to the nonlinear model of the TWIP system, and performance is observed under different transient conditions. A comparison with prevalent controllers in the literature is carried out. This comparison relates to graphical results, time domain specifications, and error performance indices, calculated for states. From this, a significant qualitative improvement can be observed with the proposed controller for all types of transients. In quantitative terms, zero steady-state error with disturbances and a five-fold improvement in settling time with parameter variations are observed. This paper also discusses the software Simulink realization for modeling and control of the TWIP system, which can be valuable for novices working in this area.