A motor controller comprising: a main motor drive circuit configured to control driving of a multi-phase electric motor; a backup motor drive circuit connected to the multi-phase electric motor in parallel to the main motor drive circuit, and configured to control driving of the multi-phase electric motor, when an abnormality occurs at the main motor drive circuit; and an abnormality diagnosis unit configured to diagnose the abnormality of the main motor drive circuit and the backup motor drive circuit; wherein in a normal drive state, only the main motor drive circuit is configured to drive the multi-phase electric motor, and wherein in a backup drive state, when the abnormality diagnosis unit diagnoses that the abnormality occurs at the main motor drive circuit as a diagnoses result, a motor current of a phase output unit where the abnormality occurs is cut off and the phase output unit that has been cut off is replaced with another phase output unit of a same phase in the backup motor drive circuit to drive the multi-phase electric motor; characterized in that the abnormality diagnosis unit is configured to diagnose the abnormality of the main motor drive circuit, in the normal drive state where the main motor drive circuit is driving the multi-phase electric motor, and wherein while the main motor drive circuit is driving the multi-phase electric motor, the abnormality diagnosis unit is configured to diagnose the abnormality of the backup motor drive circuit, by replacing at least a part of the phase output unit in the main motor drive circuit with the another phase output unit of the same phase in the backup motor drive circuit. a main motor drive circuit configured to control driving of a multi-phase electric motor; a backup motor drive circuit connected to the multi-phase electric motor in parallel to the main motor drive circuit, and configured to control driving of the multi-phase electric motor, when an abnormality occurs at the main motor drive circuit; and an abnormality diagnosis unit configured to diagnose the abnormality of the main motor drive circuit and the backup motor drive circuit; wherein in a normal drive state, only the main motor drive circuit is configured to drive the multi-phase electric motor, and wherein in a backup drive state, when the abnormality diagnosis unit diagnoses that the abnormality occurs at the main motor drive circuit as a diagnoses result, a motor current of a phase output unit where the abnormality occurs is cut off and the phase output unit that has been cut off is replaced with another phase output unit of a same phase in the backup motor drive circuit to drive the multi-phase electric motor; the abnormality diagnosis unit is configured to diagnose the abnormality of the main motor drive circuit, in the normal drive state where the main motor drive circuit is driving the multi-phase electric motor, and wherein while the main motor drive circuit is driving the multi-phase electric motor, the abnormality diagnosis unit is configured to diagnose the abnormality of the backup motor drive circuit, by replacing at least a part of the phase output unit in the main motor drive circuit with the another phase output unit of the same phase in the backup motor drive circuit.