Abstract: A motor device includes a motor body having a stator and a rotor, and an EDU for controlling the motor body. A hydro unit is disposed between the motor body and the EDU (Electric Driver Unit). In the motor body, a plurality of terminal lines for energizing the coil of the stator and the EDU is drawn around, and a rotation detection unit for detecting the rotation of the rotor is provided a space formed between the plurality of drawn terminal lines and the rotation shaft of the motor.