This utility model discloses a joint mechanism for a
humanoid robot. The joint mechanism includes: a first driving member for driving the
robot to rotate around a first axis; a second driving member for driving the
robot to rotate around a second axis; a first housing having at least two wire holes extending in a planar direction; a second housing having an opening for wires to pass through, and at least two vertical cavities extending in a vertical direction, with their tops connected through the openings and their bottoms connected to the wire holes; the second housing and the first housing are rotatably connected, and both have an installation position and an initial position. In the initial position, the vertical cavities and wire holes are misaligned, and the openings, vertical cavities, and wire holes form a first three-dimensional wiring path; in the installation position, the vertical cavities and wire holes are aligned, and the openings, vertical cavities, and wire holes form a second three-dimensional wiring path; the length of the first three-dimensional wiring path is greater than the length of the second three-dimensional wiring path. This utility model increases the wiring space through the cooperation of the vertical cavities and wire holes.