A heat pump device comprising: a compressor that compresses a refrigerant; a motor that drives the compressor ; an inverter that applies a desired voltage to the motor ; and an inverter control unit configured to generate a PWM signal for driving the inverter, to include, as an operation mode, a heating operation mode in which a heating operation is performed on the compressor and a normal operation mode in which a refrigerant is compressed by performing a normal operation on the compressor , characterized in that the heat pump device further comprises a wiring switching unit that switches a wiring structure of the motor , the inverter control unit is configured to control a switching operation of the wiring switching unit , wherein in accordance with a connection state with the wiring switching unit , the motor forms either of a first wiring structure with which an impedance becomes large and a second wiring structure with which an impedance is smaller than that in the first wiring structure, and in the heating operation mode, the inverter control unit is configured to control the switching operation of the wiring switching unit in accordance with a voltage command, wherein when the voltage command is equal to or larger than a limit (Lim), the wiring switching unit switches the connection destination to the second wiring structure, and when the voltage command falls below the limit (Lim), the wiring switching unit switches the connection destination to the first wiring structure, and wherein when an amount of heat is insufficient, the inverter control unit is configured to control the switching operation of the wiring switching unit such that the motor forms the second wiring structure. a compressor that compresses a refrigerant; a motor that drives the compressor ; an inverter that applies a desired voltage to the motor ; and an inverter control unit configured to generate a PWM signal for driving the inverter, to include, as an operation mode, a heating operation mode in which a heating operation is performed on the compressor and a normal operation mode in which a refrigerant is compressed by performing a normal operation on the compressor , characterized in that the heat pump device further comprises a wiring switching unit that switches a wiring structure of the motor , the inverter control unit is configured to control a switching operation of the wiring switching unit , wherein in accordance with a connection state with the wiring switching unit , the motor forms either of a first wiring structure with which an impedance becomes large and a second wiring structure with which an impedance is smaller than that in the first wiring structure, and in the heating operation mode, the inverter control unit is configured to control the switching operation of the wiring switching unit in accordance with a voltage command, wherein when the voltage command is equal to or larger than a limit (Lim), the wiring switching unit switches the connection destination to the second wiring structure, and when the voltage command falls below the limit (Lim), the wiring switching unit switches the connection destination to the first wiring structure, and wherein when an amount of heat is insufficient, the inverter control unit is configured to control the switching operation of the wiring switching unit such that the motor forms the second wiring structure. <EOS>