This paper first uses a decoupling modeling method to model legged robots. The method groups all the degrees of freedom according to the number of limbs, regarding each limb as a manipulator with serial structure, which greatly reduces the number of dynamic parameters that need to be identified simultaneously. On this basis, a step-by-step identification method from the end-effector link to the base link, referred to as “E-B” identification method, is proposed. Simulation verification is carried out on a quadruped robot with 16 degrees of freedom in Gazebo, and the validity of the method proposed is discussed.