A device, mounted on a hydraulic excavator, for allowing each of first and second electric motors (13), (14) to generate power by using electric power supplied from a power supply having a predetermined capacity, and actuating a boom cylinder (6), an arm cylinder (7), etc. using the generated power. Electric motor controllers (24), (25), respectively control power that is generated by the electric motors (13), (14) so that, in machine-operation, powers generated by the electric motors (13), (14) may be equal to or less than predetermined rated outputs, and the total amount of powers generated simultaneously by the electric motors (13), (14) correspond to the maximum capacity of the power supply.