An electric actuator comprising: a cylinder body having an inner wall; a screw shaft which is provided in the cylinder body, extends in an axial direction, comprises an axial center and is configured to be rotated by an electric motor; a nut into which the screw shaft is screwed; a piston rod which is configured to move linearly in accordance with rotation of the screw shaft via the nut and which comprises a piston part, said piston part being configured to slide along the inner wall of the cylinder body; a recess formed on an outer circumferential surface of the nut and including a first parallel face parallel to the axial direction of the screw shaft and an inclined face inclined with respect to the axial direction, the first parallel face and the inclined face located in this order in the direction in which the piston rod retracts; a key for locking the piston rod, said key being provided to the recess; a hole which is formed on an outer circumference of the piston part of the piston rod, and into which hole the key is fitted; a tapered portion formed on the inner wall of the cylinder body and to which a tapered face of the key is able to be fitted; and a ring-shaped engaging member, engaging with the nut when the piston rod retracts, and which is on an end portion of the piston part, which end portion is located in a direction in which the piston rod retracts, a rear end face of the nut being configured to hit the engaging member of the piston part when the nut retracts; wherein, when the electric motor is driven, the screw shaft rotates, causing the piston rod to advance with the nut; when the key reaches the tapered portion, advancement of the piston rod is arrested by the piston part and the key moves outwardly away from the axial center and along the inclined face to cause the key to fit to the tapered portion to block the retraction of the piston rod, when the retraction of the piston rod is blocked by the key, the rear end face of the nut does not make contact with the engaging member, and when the electric motor is driven in the opposite direction, the nut starts retracting first, then the key moves toward the axial center along the inclined face, and the rear end face of the nut makes contact with the engaging member so that the piston rod retracts together with the nut; and when the nut further retracts, a bottom face of the key reaches the first parallel face to unlock the retraction of the piston rod. a cylinder body having an inner wall; a screw shaft which is provided in the cylinder body, extends in an axial direction, comprises an axial center and is configured to be rotated by an electric motor; a nut into which the screw shaft is screwed; a piston rod which is configured to move linearly in accordance with rotation of the screw shaft via the nut and which comprises a piston part, said piston part being configured to slide along the inner wall of the cylinder body; a recess formed on an outer circumferential surface of the nut and including a first parallel face parallel to the axial direction of the screw shaft and an inclined face inclined with respect to the axial direction, the first parallel face and the inclined face located in this order in the direction in which the piston rod retracts; a key for locking the piston rod, said key being provided to the recess; a hole which is formed on an outer circumference of the piston part of the piston rod, and into which hole the key is fitted; a tapered portion formed on the inner wall of the cylinder body and to which a tapered face of the key is able to be fitted; and a ring-shaped engaging member, engaging with the nut when the piston rod retracts, and which is on an end portion of the piston part, which end portion is located in a direction in which the piston rod retracts, a rear end face of the nut being configured to hit the engaging member of the piston part when the nut retracts; wherein, when the electric motor is driven, the screw shaft rotates, causing the piston rod to advance with the nut; when the key reaches the tapered portion, advancement of the piston rod is arrested by the piston part and the key moves outwardly away from the axial center and along the inclined face to cause the key to fit to the tapered portion to block the retraction of the piston rod, when the retraction of the piston rod is blocked by the key, the rear end face of the nut does not make contact with the engaging member, and when the electric motor is driven in the opposite direction, the nut starts retracting first, then the key moves toward the axial center along the inclined face, and the rear end face of the nut makes contact with the engaging member so that the piston rod retracts together with the nut; and when the nut further retracts, a bottom face of the key reaches the first parallel face to unlock the retraction of the piston rod.