In this paper, an optimal robust adaptive fuzzy backstepping control is presented to the position control of the electro-hydraulic servo (EHS) system in the presence of structured and unstructured uncertainties. Initially, the robust control using the backstepping technique is presented to overcome the existing uncertainties in the dynamic equations. Mathematical proof demonstrates that the closed-loop system in the presence of uncertainties has a global asymptotic stability. Then, to overcome the chattering problem, a very simple fuzzy approximator is presented where it approximates the bounds of the uncertainties. Although the proposed robust fuzzy backstepping control has a desirable performance, it has no mathematical analysis to prove the stability of the closed-loop system. Therefore, to solve this problem, the proposed fuzzy approximator has been transformed into a one-law adaptive fuzzy approximator with a single-input single-output fuzzy rule. Mathematical analysis illustrates that the closed-loop system in the presence of uncertainties has a global asymptotic stability under the proposed robust adaptive fuzzy backstepping control. Furthermore, a novel modified harmony search algorithm (MHSA) has been developed, by using the original harmony search algorithm (OHSA) as an optimization technique, to achieve the optimal values of the membership functions and the control coefficients. Finally, a comparative study has been conducted between the proposed control scheme under the MHSA and the OHSA, and other existing advanced control approaches to verify the effectiveness of the proposed control. Results show that the proposed control scheme under the MHSA can suppress the chattering problem and reduce the disturbances effectively while ensuring that the performance is tracked.