The invention discloses a motion controller of a four-leg robot with a CANOpen (Control Area Network Open) bus structure. The motion controller comprises an operation table, a main controller, a vision system, a gesture measurement system, a leg sub-controller, a head sub-controller, a leg driver, a head driver, a leg joint motor, a head joint motor, a leg position sensor, a head position sensor and a foot force sensor, wherein the leg sub-controller comprises a right front sub-controller, a left rear sub-controller, a left front sub-controller and a right rear sub-controller. By using the main controller to process the gesture information and the vision information, the motion gait and the motion path of the robot are programmed at real time; at the same time, a motion command is transmitted to the leg sub-controller and the head sub-controller; the leg sub-controller and the head sub-controller achieve the real-time control and the accurate control of a bottom-layer motor by the feedback information of a sensor, so that the self-adapting walk of the four-leg robot is achieved under a complicate environment.