In this paper, mathematical models of kinematics, statics and inverse dynamics are derived firstly according to the mechanical structure of leg hydraulic drive system (LHDS). Then, all the above models are integrated with MATLAB/Simulink to build the LHDS simulation model, the model not only considers influence of leg dynamic characteristics on hydraulic system but also takes into account nonlinearity, variable load characteristics and other common problems brought by hydraulic system, and solves compatibility and operation time which brought by using multiple software simultaneously. The experimental results show the simulation model built in this paper can accurately express characteristics of the system.