A motor control device comprising: a motor lock state determining unit configured to determine whether a motor is in a lock state in which the motor cannot be rotated; a lock detection invalidation determining unit configured to invalidate the determination of the lock state of the motor executed by the motor lock state determining unit; and a position hold state determining unit configured to determine whether the motor is in a position hold state in which the motor is stopped with a rotation position of the motor being held; wherein the motor lock state determining unit is configured to determine whether a motor is in a lock state in which the motor cannot be rotated based on a signal changing depending on driving of the motor and based on whether or not a control signal input to a motor driver does not change for a first predetermined time; wherein the lock detection invalidation determining unit is configured to invalidate the determination of the lock state of the motor executed by the motor lock state determining unit when it is determined by the position hold state determining unit that the motor is in the position hold state and when a predetermined condition is satisfied; wherein said predetermined condition is satisfied when: a) a target speed reaches 0, b) a target position becomes not to change, c) an internal state becomes a position hold, d) an internal state becomes a stop position, e) a motor control signal is not input; or various control signals and Hall effect element signal or encoder signal do not change; characterised by a position error correction unit configured to correct an error of a target stop position of the motor so that the error falls within a predetermined range when the determination of the lock state of the motor has been invalidated by the lock detection invalidation determining unit; and a motor control unit configured to perform control to change a rotation direction of the motor when a second predetermined time has passed after the error is corrected, said second predetermined time being a time shorter than the first predetermined time in which the motor lock state determining unit determines that the motor is in the lock state when the motor is in the position hold state. a motor lock state determining unit configured to determine whether a motor is in a lock state in which the motor cannot be rotated; a lock detection invalidation determining unit configured to invalidate the determination of the lock state of the motor executed by the motor lock state determining unit; and a position hold state determining unit configured to determine whether the motor is in a position hold state in which the motor is stopped with a rotation position of the motor being held; wherein the motor lock state determining unit is configured to determine whether a motor is in a lock state in which the motor cannot be rotated based on a signal changing depending on driving of the motor and based on whether or not a control signal input to a motor driver does not change for a first predetermined time; wherein the lock detection invalidation determining unit is configured to invalidate the determination of the lock state of the motor executed by the motor lock state determining unit when it is determined by the position hold state determining unit that the motor is in the position hold state and when a predetermined condition is satisfied; wherein said predetermined condition is satisfied when: a) a target speed reaches 0, b) a target position becomes not to change, c) an internal state becomes a position hold, d) an internal state becomes a stop position, e) a motor control signal is not input; or various control signals and Hall effect element signal or encoder signal do not change; a) a target speed reaches 0, b) a target position becomes not to change, c) an internal state becomes a position hold, d) an internal state becomes a stop position, e) a motor control signal is not input; or various control signals and Hall effect element signal or encoder signal do not change; a position error correction unit configured to correct an error of a target stop position of the motor so that the error falls within a predetermined range when the determination of the lock state of the motor has been invalidated by the lock detection invalidation determining unit; and a motor control unit configured to perform control to change a rotation direction of the motor when a second predetermined time has passed after the error is corrected, said second predetermined time being a time shorter than the first predetermined time in which the motor lock state determining unit determines that the motor is in the lock state when the motor is in the position hold state.