A motor controller, comprising: a case to which a power module board and a control board are attached, the power module board mounting a power device for making a drive current flow to an electric motor, the control board mounting an electronic part for controlling driving of the electric motor; a connector configured to be inserted into a connector receiving depression section provided in the case; a connector housing having a power supply connector receiving depression section and at least one signal connector receiving depression section (54b to 54d), with the connector being inserted into the connector receiving depression section; a plurality of terminals (55a to 55d) configured to be secured to the connector housing and soldered for connection with the control board; characterized by a first securing section and a second securing section configured to secure the connector to the case at an outer circumference of the connector housing; and a positioning section configured to position the connector to the case, when the connector is inserted into the connector receiving depression section, wherein the first securing section is arranged at the outer circumference of the connector housing and in vicinity of the at least one signal connector receiving depression section (54b to 54d), wherein the second securing section and the positioning section are arranged at the outer circumference of the connector housing and in vicinity of the power supply connector receiving depression section, and wherein the first securing section and the second securing section are reinforced by ribs (56a2, 56b2), respectively, and are arranged at the outer circumference of the connector housing, wherein a first rib reinforcing the first securing section is smaller than a second rib reinforcing the second securing section, and wherein a flange configured to sit on a flat section provided at a surrounding wall that configures the connector receiving depression section of the case is provided at the outer circumference of the connector housing. a case to which a power module board and a control board are attached, the power module board mounting a power device for making a drive current flow to an electric motor, the control board mounting an electronic part for controlling driving of the electric motor; a connector configured to be inserted into a connector receiving depression section provided in the case; a connector housing having a power supply connector receiving depression section and at least one signal connector receiving depression section (54b to 54d), with the connector being inserted into the connector receiving depression section; a plurality of terminals (55a to 55d) configured to be secured to the connector housing and soldered for connection with the control board; characterized by a first securing section and a second securing section configured to secure the connector to the case at an outer circumference of the connector housing; and a positioning section configured to position the connector to the case, when the connector is inserted into the connector receiving depression section, wherein the first securing section is arranged at the outer circumference of the connector housing and in vicinity of the at least one signal connector receiving depression section (54b to 54d), wherein the second securing section and the positioning section are arranged at the outer circumference of the connector housing and in vicinity of the power supply connector receiving depression section, and wherein the first securing section and the second securing section are reinforced by ribs (56a2, 56b2), respectively, and are arranged at the outer circumference of the connector housing, wherein a first rib reinforcing the first securing section is smaller than a second rib reinforcing the second securing section, and wherein a flange configured to sit on a flat section provided at a surrounding wall that configures the connector receiving depression section of the case is provided at the outer circumference of the connector housing.