The rotary inverted pendulum (RIP) system is one of the fundamental, nonlinear, unstable and interesting benchmark systems in the field of control theory. In this paper, two nonlinear control strategies, namely hierarchical sliding mode control (HSMC) and decoupled sliding mode control (DSMC), are discussed to address the stabilization problem of the RIP system. We introduced HSMC with state-dependent switching gain for stabilization of the RIP system. Numerical simulations are performed to analyze the performance of the hierarchical sliding mode controllers with the decoupled sliding mode controller and the controller obtained from the pole placement technique. We proposed HSMC with state-dependent switching gain as it shows better performance as compared to HSMC with constant switching gain, DSMC, and the state feedback controller based on pole placement technique. The stability analysis of proposed HSMC is also discussed by using Lyapunov stability theory.