A second-order hierarchical fast terminal sliding mode control method based on disturbance observer (DOSHFTSM) is proposed for a class of fourth-order underactuated systems. In the first step, the fourth-order underactuated system is divided into two subsystems, and the integral sliding surface is designed for each subsystem. Then, the first-order fast terminal sliding surface is defined by using the integral sliding surface and its derivatives of each subsystem, and the switching control items of the system are designed according to the first-order fast terminal sliding surface of the subsystem. Secondly, the second-order sliding surface is designed by using the first-order fast terminal sliding surface of each subsystem. On the premise of ensuring the stability of Lyapunov, the switching control term is designed by using the variable coefficient double power reaching law to eliminate the system jitter. Finally, based on the principle of hyperbolic tangent nonlinear tracking differentiator, a hyperbolic tangent nonlinear disturbance observer (TANH-DOC) is designed to estimate the uncertainties and external disturbances of the system and compensate them to the sliding mode controller to improve the robustness of the system. The stability of the system is proved by using Lyapunov principle. The validity of this method is verified by numerical simulation and physical simulation of inverted pendulum system.