A robotic arm for a surgical robot, comprising: a vertical movement joint, configured to move a heavy mass in a vertical direction; a rotary joint, sleeved over a rotational shaft and configured to rotate about the rotational shaft to drive the vertical movement joint to rotate; and a horizontal movement joint, configured to drive the rotational shaft to move in a horizontal direction, wherein the horizontal movement joint is fixedly connected to one end of the rotational shaft and is perpendicular to the rotational shaft, wherein the robotic arm for a surgical robot further comprises a gravity-balancing mechanism for gravitationally balancing the heavy mass hung on the vertical movement joint, wherein the rotary joint comprises a first rotary joint and a second rotary joint, the rotational shaft comprising a first rotational shaft and a second rotational shaft parallel to the first rotational shaft; the first rotary joint sleeved over the first rotational shaft and able to rotate about the first rotational shaft, the second rotary joint sleeved over the second rotational shaft and able to rotate about the second rotational shaft; a connecting lever fixedly connected to both the first rotary joint and the second rotary joint; the horizontal movement joint fixedly connected to one end of the first rotational shaft, the vertical movement joint fixedly connected to one end of the second rotational shaft, the gravity-balancing mechanism is connected to the vertical movement joint and housed in the connecting lever, the gravity-balancing mechanism comprises a constant-force spring, a spring connector, a guide assembly and a first flexible member, the constant-force spring having one end fixedly connected to the connecting lever and the other end fixedly connected to the spring connector, the spring connector fixedly connected to the first flexible member, the guide assembly provided at least on the connecting lever and on the vertical movement joint, the first flexible member configured to be guided by the guide assembly into fixed connection with the vertical movement joint. a vertical movement joint, configured to move a heavy mass in a vertical direction; a rotary joint, sleeved over a rotational shaft and configured to rotate about the rotational shaft to drive the vertical movement joint to rotate; and a horizontal movement joint, configured to drive the rotational shaft to move in a horizontal direction, wherein the horizontal movement joint is fixedly connected to one end of the rotational shaft and is perpendicular to the rotational shaft, wherein the robotic arm for a surgical robot further comprises a gravity-balancing mechanism for gravitationally balancing the heavy mass hung on the vertical movement joint, wherein the rotary joint comprises a first rotary joint and a second rotary joint, the rotational shaft comprising a first rotational shaft and a second rotational shaft parallel to the first rotational shaft; the first rotary joint sleeved over the first rotational shaft and able to rotate about the first rotational shaft, the second rotary joint sleeved over the second rotational shaft and able to rotate about the second rotational shaft; a connecting lever fixedly connected to both the first rotary joint and the second rotary joint; the horizontal movement joint fixedly connected to one end of the first rotational shaft, the vertical movement joint fixedly connected to one end of the second rotational shaft, the gravity-balancing mechanism is connected to the vertical movement joint and housed in the connecting lever, the gravity-balancing mechanism comprises a constant-force spring, a spring connector, a guide assembly and a first flexible member, the constant-force spring having one end fixedly connected to the connecting lever and the other end fixedly connected to the spring connector, the spring connector fixedly connected to the first flexible member, the guide assembly provided at least on the connecting lever and on the vertical movement joint, the first flexible member configured to be guided by the guide assembly into fixed connection with the vertical movement joint.