To discharge the charging electric charge of a capacitor without installing an exclusive discharging circuit when a device is stopped.
This DC power supply device for an inverter is constituted as follows: A high-voltage DC power supply is generated by boosting a low-voltage DC power supply BAT by step-up circuits L1, Tr1, R2, and D1. It is supplied to a DC link of the inverter INV. When switches MR1, MR2, and MR3 are open and the supply of the low-voltage DC power supply BAT to the step-up circuits L1, Tr1, R2, and D1 is stopped, a first capacitor C1 and a second capacitor C2 are discharged by flowing only a d-axis current to a motor M by the inverter INV from the first capacitor C1 installed on the low-voltage DC power supply side and the second capacitor C2 installed on the high-voltage DC power supply side.