A hybrid work machine comprising: an engine; an assist motor mechanically connected to the engine, causing a discharge by generating a drive torque, and generating electric power by generating a brake torque; a hydraulic pump driven by a total torque of the engine and the assist motor; an accessory mechanically connected to the engine; an electric storage device storing the electric power generated by the assist motor and supplying the electric power when the assist motor is driven; an inverter allowing the electric storage device and the assist motor to transmit and receive the electric power therebetween; and a controller outputting a torque command signal to the inverter in order to control the drive torque or the brake torque of the assist motor, characterized in that, the controller comprises a torque-command-value arithmetic unit (82, 83) calculating the torque command signal, and the torque-command-value arithmetic unit (82, 83) is configured to: calculate a hydraulic pump torque (Tp) necessary to drive the hydraulic pump; calculate an accessory torque (Tc) necessary to drive the accessory; calculate at least one of an SOC-adjustment assist motor torque (Ta_SOC) and a warm-up-operation assist motor torque (Ta_warm) based on a charge rate of the electric storage device, and when a total value of the hydraulic pump torque (Tp) and the accessory torque (Tc) is equal to or lower than a preset maximum torque (Te_max) of the engine and is equal to or higher than a preset minimum torque (Te_min) of the engine, select a lower value among a value of the SOC-adjustment assist motor torque (Ta_SOC) or the warm-up-operation assist motor torque (Ta_warm) and a value obtained by subtracting the minimum torque (Te_min) of the engine from the total value of the hydraulic pump torque (Tp) and the accessory torque (Tc), and set, as the torque command value, a higher value among the selected value and a value obtained by subtracting the maximum torque (Te_max) of the engine from the total value of the hydraulic pump torque (Tp) and the accessory torque (Tc). an engine; an assist motor mechanically connected to the engine, causing a discharge by generating a drive torque, and generating electric power by generating a brake torque; a hydraulic pump driven by a total torque of the engine and the assist motor; an accessory mechanically connected to the engine; an electric storage device storing the electric power generated by the assist motor and supplying the electric power when the assist motor is driven; an inverter allowing the electric storage device and the assist motor to transmit and receive the electric power therebetween; and a controller outputting a torque command signal to the inverter in order to control the drive torque or the brake torque of the assist motor, characterized in that, the controller comprises a torque-command-value arithmetic unit (82, 83) calculating the torque command signal, and the torque-command-value arithmetic unit (82, 83) is configured to: calculate a hydraulic pump torque (Tp) necessary to drive the hydraulic pump; calculate an accessory torque (Tc) necessary to drive the accessory; calculate at least one of an SOC-adjustment assist motor torque (Ta_SOC) and a warm-up-operation assist motor torque (Ta_warm) based on a charge rate of the electric storage device, and when a total value of the hydraulic pump torque (Tp) and the accessory torque (Tc) is equal to or lower than a preset maximum torque (Te_max) of the engine and is equal to or higher than a preset minimum torque (Te_min) of the engine, select a lower value among a value of the SOC-adjustment assist motor torque (Ta_SOC) or the warm-up-operation assist motor torque (Ta_warm) and a value obtained by subtracting the minimum torque (Te_min) of the engine from the total value of the hydraulic pump torque (Tp) and the accessory torque (Tc), and set, as the torque command value, a higher value among the selected value and a value obtained by subtracting the maximum torque (Te_max) of the engine from the total value of the hydraulic pump torque (Tp) and the accessory torque (Tc). calculate a hydraulic pump torque (Tp) necessary to drive the hydraulic pump; calculate an accessory torque (Tc) necessary to drive the accessory; calculate at least one of an SOC-adjustment assist motor torque (Ta_SOC) and a warm-up-operation assist motor torque (Ta_warm) based on a charge rate of the electric storage device, and when a total value of the hydraulic pump torque (Tp) and the accessory torque (Tc) is equal to or lower than a preset maximum torque (Te_max) of the engine and is equal to or higher than a preset minimum torque (Te_min) of the engine, select a lower value among a value of the SOC-adjustment assist motor torque (Ta_SOC) or the warm-up-operation assist motor torque (Ta_warm) and a value obtained by subtracting the minimum torque (Te_min) of the engine from the total value of the hydraulic pump torque (Tp) and the accessory torque (Tc), and set, as the torque command value, a higher value among the selected value and a value obtained by subtracting the maximum torque (Te_max) of the engine from the total value of the hydraulic pump torque (Tp) and the accessory torque (Tc).