A machining power supply device for an electric discharge machine configured to machine a workpiece by applying a voltage to a machining gap between an electrode and the workpiece to cause an electric discharge across the gap, the machining power supply device comprising: a DC power supply; a capacitor directly or indirectly connected in parallel with the machining gap; a first semiconductor switching element arranged in series between the DC power supply and the capacitor; and a second semiconductor switching element arranged in parallel with the capacitor; a rectifier element inserted in a circuit loop composed of the capacitor and the second semiconductor switching element; and a control unit configured to control the first and the second semiconductor switching elements, characterised in that the control unit is configured to turn on the first semiconductor switching element to charge the capacitor, and turn on the second semiconductor switching element within a period in which the first semiconductor switching element is off; and in that the machining power supply device further comprises a third semiconductor switching element arranged in series between the machining gap and the capacitor, wherein the control unit is further configured to turn on the third semiconductor switching element when turning off the first semiconductor switching element so as to discharge the capacitor by supplying current from the capacitor to the machining gap and to keep the third semiconductor switching element on for a predetermined period so that the capacitor is fully discharged and becomes charged with a residual voltage in the direction opposite to the direction in which it was originally charged, and turn on the second semiconductor switching element within a period in which the first semiconductor switching element and the third semiconductor switching element are both off so as to reverse the residual voltage of the capacitor. a DC power supply; a capacitor directly or indirectly connected in parallel with the machining gap; a first semiconductor switching element arranged in series between the DC power supply and the capacitor; and a second semiconductor switching element arranged in parallel with the capacitor; a rectifier element inserted in a circuit loop composed of the capacitor and the second semiconductor switching element; and a control unit configured to control the first and the second semiconductor switching elements, characterised in that the control unit is configured to turn on the first semiconductor switching element to charge the capacitor, and turn on the second semiconductor switching element within a period in which the first semiconductor switching element is off; and in that the machining power supply device further comprises a third semiconductor switching element arranged in series between the machining gap and the capacitor, wherein the control unit is further configured to turn on the third semiconductor switching element when turning off the first semiconductor switching element so as to discharge the capacitor by supplying current from the capacitor to the machining gap and to keep the third semiconductor switching element on for a predetermined period so that the capacitor is fully discharged and becomes charged with a residual voltage in the direction opposite to the direction in which it was originally charged, and turn on the second semiconductor switching element within a period in which the first semiconductor switching element and the third semiconductor switching element are both off so as to reverse the residual voltage of the capacitor.