Observer-based control is the most commonly used method in the control of electro-hydraulic servo system (EHSS) with uncertainties, but it suffers from the drawback of low accuracy under the influence of large external load forces and disturbances. To address this problem, this paper proposes a novel compensation function observer-based backstepping sliding-mode control (BSMC) approach to achieve high-accuracy tracking control. In particular, the model uncertainties, including nonlinearities, parameter perturbations and external disturbances are analyzed and treated together as a lumped disturbance. Then, a fourth-order compensation function observer (CFO) is constructed, which fully utilizes the system state information to accurately estimate the lumped disturbance. On this basis, the estimate of the lumped disturbance is incorporated into the design of a backstepping sliding-mode controller, allowing the control system to compensate for the disturbance effect. The stability of the closed-loop control system under the CFO and BSMC is rigorously proven through the use of the Lyapunov theory, which guarantees that all the tracking error signals converge exponentially to the origin. Comparative simulations are carried out to show the effectiveness and efficiency of the proposed approach, i.e., compared with PID and ESO-based BSMC methods, the tracking accuracy is respectively improved by 94.86% and 88.19% under the influence of large external load forces and disturbances.