This paper presents the detailed dynamic modeling of a quadruped robot. The forward and inverse kinematic analysis of each leg of the proposed model is deduced using Denavit-Hartenberg (D-H) parameters. It desires to calculate the optimal feet forces of the quadruped robot’s joint torque, which is essential for its online control. To find out the optimal feet force distribution, two approaches are implemented to fulfill the locomotion objective. The four-legged quadruped robot and torso body’s detailed dynamics are modeled to generate an equation of motion for the robot control system. The Euler–Langrage theory has been used to find out the joint motion. The computer simulation results are presented to verify the effectiveness of the dynamic model.