To ensure the stability of vertical mold casting machine casting, and improve the quality of casting, for which the electro-hydraulic servo system of the traditional active disturbance rejection control(ADRC) of the nonlinear function is not smooth and the parameters are difficult to adjust as well as the dual hydraulic cylinders synchronization of the problem of low precision, a new type of nonlinear function is used. To improve the effect of parameter optimization and tuning, the snake optimization algorithm(SO) is used to optimize and tune the parameters of the nonlinear state feedback rate and the expansion state observer, which is more convenient for parameter tuning, and also makes it possible to reduce the error. The simulation results show that compared with the PID controller and the traditional ADRC controller, the ADRC controller based on the Ifal function and SO has a certain jitter suppression effect as well as good tracking and synchronization performance, which can effectively improve the tracking and synchronization accuracy of the twin cylinders of the electro-hydraulic servo system.