A motor-driven compressor comprising: a compression unit including a movable scroll, a fixed scroll, and a compression chamber formed by engagement of the movable scroll and the fixed scroll, wherein the compression unit is configured to compress low pressure refrigerant drawn into the compression chamber to discharge high pressure refrigerant; an electric motor including a rotor, wherein the electric motor is configured to drive the compression unit; a motor drive circuit that is configured to drive the electric motor and includes an upper arm switching element (31a, 31b, 31c) and a lower arm switching element (32a, 32b, 32c), an injection port that is configured to draw intermediate pressure refrigerant into the compression chamber; a controller that is configured to perform rotation control on the rotor; and a voltage detector that is configured to detect a terminal voltage of the electric motor, wherein the controller is configured to output a stop instruction to deactivate the rotation control of the rotor, determine a rotation condition of the rotor based on the voltage detected by the voltage detector after outputting the stop instruction, and perform, based on the determination, restart preparation control that includes outputting a lock instruction to electrically stop rotation of the rotor, the lock instruction being configured to activate a first element that is one of the upper arm switching element (31a, 31b, 31c) and the lower arm switching element (32a, 32b, 32c) so that the first element performs a switching operation and to deactivate a second element that is the other one of the upper arm switching element (31a, 31b, 31c) and the lower arm switching element (32a, 32b, 32c) so that the second element does not perform a switching operation. a compression unit including a movable scroll, a fixed scroll, and a compression chamber formed by engagement of the movable scroll and the fixed scroll, wherein the compression unit is configured to compress low pressure refrigerant drawn into the compression chamber to discharge high pressure refrigerant; an electric motor including a rotor, wherein the electric motor is configured to drive the compression unit; a motor drive circuit that is configured to drive the electric motor and includes an upper arm switching element (31a, 31b, 31c) and a lower arm switching element (32a, 32b, 32c), an injection port that is configured to draw intermediate pressure refrigerant into the compression chamber; a controller that is configured to perform rotation control on the rotor; and a voltage detector that is configured to detect a terminal voltage of the electric motor, wherein the controller is configured to output a stop instruction to deactivate the rotation control of the rotor, determine a rotation condition of the rotor based on the voltage detected by the voltage detector after outputting the stop instruction, and perform, based on the determination, restart preparation control that includes outputting a lock instruction to electrically stop rotation of the rotor, the lock instruction being configured to activate a first element that is one of the upper arm switching element (31a, 31b, 31c) and the lower arm switching element (32a, 32b, 32c) so that the first element performs a switching operation and to deactivate a second element that is the other one of the upper arm switching element (31a, 31b, 31c) and the lower arm switching element (32a, 32b, 32c) so that the second element does not perform a switching operation.