A heat pump device that includes a compressor (1, 51) including a compression mechanism that compresses a refrigerant and a motor that drives the compression mechanism, a heat exchanger (3, 5), an inverter that applies a desired voltage to the motor, and an inverter control unit including a drive-signal generation unit that generates a drive signal for the inverter and a heating-operation-mode control unit that controls the drive-signal generation unit when the compressor (1, 51) is heated by applying, to the motor, a high-frequency voltage with which the motor is not capable of being rotationally driven, and the heat pump device being characterized in that: the heating-operation-mode control unit includes a magnetic-pole-position estimation unit configured to estimate a magnetic pole position, which indicates a stop position of a rotor of the motor, on a basis of an induced voltage of the motor, and an amplitude and phase determination unit configured to: determine a phase of a voltage command on a basis of an estimation result of the magnetic pole position; determine an amplitude of the voltage command corresponding to a prespecified necessary amount by using table data indicating a relationship between the prespecified necessary amount of heat for evaporating the refrigerant retained in the compressor (1, 51) and an amplitude of the voltage command to be output; notify the drive-signal generation unit of determined amplitude and phase, and cause the drive-signal generation unit to generate a drive signal according to a notification content, the inverter control unit is configured to: calculate a heat output on the basis of input and output currents and input and output voltage of the motor; and control the phase of the voltage command so that the heat output is maximized, when the heat output is smaller than a predetermined threshold. the heating-operation-mode control unit includes a magnetic-pole-position estimation unit configured to estimate a magnetic pole position, which indicates a stop position of a rotor of the motor, on a basis of an induced voltage of the motor, and an amplitude and phase determination unit configured to: determine a phase of a voltage command on a basis of an estimation result of the magnetic pole position; determine an amplitude of the voltage command corresponding to a prespecified necessary amount by using table data indicating a relationship between the prespecified necessary amount of heat for evaporating the refrigerant retained in the compressor (1, 51) and an amplitude of the voltage command to be output; notify the drive-signal generation unit of determined amplitude and phase, and cause the drive-signal generation unit to generate a drive signal according to a notification content, a magnetic-pole-position estimation unit configured to estimate a magnetic pole position, which indicates a stop position of a rotor of the motor, on a basis of an induced voltage of the motor, and an amplitude and phase determination unit configured to: determine a phase of a voltage command on a basis of an estimation result of the magnetic pole position; determine an amplitude of the voltage command corresponding to a prespecified necessary amount by using table data indicating a relationship between the prespecified necessary amount of heat for evaporating the refrigerant retained in the compressor (1, 51) and an amplitude of the voltage command to be output; notify the drive-signal generation unit of determined amplitude and phase, and cause the drive-signal generation unit to generate a drive signal according to a notification content, determine a phase of a voltage command on a basis of an estimation result of the magnetic pole position; determine an amplitude of the voltage command corresponding to a prespecified necessary amount by using table data indicating a relationship between the prespecified necessary amount of heat for evaporating the refrigerant retained in the compressor (1, 51) and an amplitude of the voltage command to be output; notify the drive-signal generation unit of determined amplitude and phase, and cause the drive-signal generation unit to generate a drive signal according to a notification content, the inverter control unit is configured to: calculate a heat output on the basis of input and output currents and input and output voltage of the motor; and control the phase of the voltage command so that the heat output is maximized, when the heat output is smaller than a predetermined threshold. calculate a heat output on the basis of input and output currents and input and output voltage of the motor; and control the phase of the voltage command so that the heat output is maximized, when the heat output is smaller than a predetermined threshold.