The invention discloses a straight-line servo driver and a robot. The driver comprises a stator assembly, a rotor assembly, a detection assembly and at least one bearing, wherein the stator assembly is provided with a first shell; the rotor assembly is provided with a second shell and a lead screw arranged inside the second shell in a penetrating manner; the end, stretching into the interior of the first shell, of the second shell is rotatably arranged on the first shell through the at least one bearing; a detected part and a detecting piece in the detection assembly are fixed on the second shell and the first shell respectively and are close to the bearing. The robot comprises a first arm, a second arm and the driver for driving the first arm to rotate on the second arm. According to the driver, the rotation points, relative to the first shell, of the detection assembly and the second shell are both concentrated on the position of the bearing, the bearing can bear the radial and axial load of the rotor assembly and guarantees relative position of the detection assembly, a plurality of bearings do not need to be arranged, the quantity of components is reduced, the driver is convenient to process and mount, and the self weight of the driver is reduced, so that the frictional resistance is reduced, and the transmission efficiency is improved.