An injection molding machine, comprising: a motor (11, 24, 42, 44); a driver circuit (51, 52, 53,5 54) that drives the motor (11, 24, 42, 44) characterized by a rectifying part that supplies electric power to the driver circuit (51, 52, 53, 54); a regenerative line of regenerative electric power of the motor (11, 24, 42, 44) connected to the rectifying part in parallel; a converting part and a harmonics component reducing part provided in the regenerative line, the converting part converting direct electric power between the driver circuit (51, 52, 53, 54) and the rectifying part into alternating electric power which is input to the harmonics component reducing part; and a controlling part that is configured to control an operation of the converting part, wherein the controlling part is configured to control a regenerative operation of the converting part according to a direct voltage between the driver circuit (51, 52, 53, 54) and the rectifying part, wherein the controlling part is configured to perform a PWM control of the converting part based on the direct voltage between the driver circuit (51, 52, 53, 54) and the rectifying part, an alternating voltage between the converting part and the harmonics component reducing part, and an alternating voltage at an output side of the harmonics component reducing part; and wherein the controlling part is configured to determine that a regeneration stop criterion is met and to stop regenerating operation of the converting part when a direct voltage value between the driver circuit (51, 52, 53, 54) and the rectifying part is smaller than a predetermined voltage value (Vth) and a peak value of an alternative current between the converting part and the harmonics component reducing part is smaller than a predetermined current value. a motor (11, 24, 42, 44); a driver circuit (51, 52, 53,5 54) that drives the motor (11, 24, 42, 44) characterized by a rectifying part that supplies electric power to the driver circuit (51, 52, 53, 54); a regenerative line of regenerative electric power of the motor (11, 24, 42, 44) connected to the rectifying part in parallel; a converting part and a harmonics component reducing part provided in the regenerative line, the converting part converting direct electric power between the driver circuit (51, 52, 53, 54) and the rectifying part into alternating electric power which is input to the harmonics component reducing part; and a controlling part that is configured to control an operation of the converting part, wherein the controlling part is configured to control a regenerative operation of the converting part according to a direct voltage between the driver circuit (51, 52, 53, 54) and the rectifying part, wherein the controlling part is configured to perform a PWM control of the converting part based on the direct voltage between the driver circuit (51, 52, 53, 54) and the rectifying part, an alternating voltage between the converting part and the harmonics component reducing part, and an alternating voltage at an output side of the harmonics component reducing part; and wherein the controlling part is configured to determine that a regeneration stop criterion is met and to stop regenerating operation of the converting part when a direct voltage value between the driver circuit (51, 52, 53, 54) and the rectifying part is smaller than a predetermined voltage value (Vth) and a peak value of an alternative current between the converting part and the harmonics component reducing part is smaller than a predetermined current value.