The moving process of a leveling and erecting mechanism is complicated, which involves six hydraulic cylinders. The research established mathematical model and optimized the moving process of the leveling and erecting mechanism. Kinematic analysis of the mechanism was accomplished. Mathematical model of the hydraulic system was established. Working scheme was designed consisting of workflow, trajectory planning, leveling strategy and control method. The mechanical, hydraulic and control models were respectively established in Pro/E, ADAMS, AMESim and Simulink software. Co-simulation was carried out to validate the designed scheme. Experiment was completed on a platform. The results of simulation and experiment indicate that the designed scheme is feasible. Fuzzy adaptive PID controller has an excellent effect in controlling the leveling and erecting mechanism.