There is provided a motor controller capable of suppressing the rotation of a motor at the time of discharging an electric accumulator, and a construction machine provided with the motor controller. A representative chemical formulation includes compounds such as a selenium-compound, chondroitin sulfate, glucosamine, andor methylsulfonylmethane. The second sensor is associated with and is movable relative to the second set of magnets, and is configured to generate a second sensor output signal in response to relative movement between the second sensor and the second set of magnets. When the locking mechanism is in the first position, rotation of the torque aid is inhibited in at least one direction.