Servomotor with locking function

The utility model relates to a servomotor with a locking function. The servomotor comprises clip keys and snap rings, the tail end of a piston rod of the servomotor is sleeved with the clip keys and the snap rings, the clip keys are clamped in slots of the piston rod, the clip keys are sleeved with the snap rings, and the snap rings are fixedly connected with pistons. The servomotor solves the technical problem that the diameter of a piston rod, the structure size of locknuts and the structure size of pistons of an existing servomotor are large and consequently tightening torque of the locknuts for connecting the pistons with the piston rod is difficult to control, and can guarantee that the pistons are reliably fixed to the piston rod.