An air-conditioning apparatus comprising: a refrigerant cycle in which at least a compressor, a heat-source-side heat exchanger, expanding means, and a use-side heat exchanger are connected by a refrigerant pipeline and through which a refrigerant is circulated; heating means that heats the compressor; and control means that obtains a refrigerant temperature in the compressor and controls the heating means on the basis of a change rate of the refrigerant temperature per a predetermined time, wherein the control means: starts a first heating operation when the compressor is in a stopped state and the change rate of the refrigerant temperature exceeds zero; in the first heating operation, sets a heating capacity of the heating means to be in a range not more than a heating capacity upper limit (Pmax) on the basis of the change rate of the refrigerant temperature and acquires a remaining refrigerant liquid amount (Ms), which is a refrigerant amount condensed in the compressor that had not been evaporated in the first heating operation, on the basis of the change rate of the refrigerant temperature and the heating capacity; starts a second heating operation when the compressor is in the stopped state, the change rate of the refrigerant temperature is zero or below, and the remaining refrigerant liquid amount (Ms) exceeds zero; and in the second heating operation, controls the heating means on the basis of the remaining refrigerant liquid amount (Ms) and allows the refrigerant condensed in the compressor to evaporate. a refrigerant cycle in which at least a compressor, a heat-source-side heat exchanger, expanding means, and a use-side heat exchanger are connected by a refrigerant pipeline and through which a refrigerant is circulated; heating means that heats the compressor; and control means that obtains a refrigerant temperature in the compressor and controls the heating means on the basis of a change rate of the refrigerant temperature per a predetermined time, wherein the control means: starts a first heating operation when the compressor is in a stopped state and the change rate of the refrigerant temperature exceeds zero; in the first heating operation, sets a heating capacity of the heating means to be in a range not more than a heating capacity upper limit (Pmax) on the basis of the change rate of the refrigerant temperature and acquires a remaining refrigerant liquid amount (Ms), which is a refrigerant amount condensed in the compressor that had not been evaporated in the first heating operation, on the basis of the change rate of the refrigerant temperature and the heating capacity; starts a second heating operation when the compressor is in the stopped state, the change rate of the refrigerant temperature is zero or below, and the remaining refrigerant liquid amount (Ms) exceeds zero; and in the second heating operation, controls the heating means on the basis of the remaining refrigerant liquid amount (Ms) and allows the refrigerant condensed in the compressor to evaporate. starts a first heating operation when the compressor is in a stopped state and the change rate of the refrigerant temperature exceeds zero; in the first heating operation, sets a heating capacity of the heating means to be in a range not more than a heating capacity upper limit (Pmax) on the basis of the change rate of the refrigerant temperature and acquires a remaining refrigerant liquid amount (Ms), which is a refrigerant amount condensed in the compressor that had not been evaporated in the first heating operation, on the basis of the change rate of the refrigerant temperature and the heating capacity; starts a second heating operation when the compressor is in the stopped state, the change rate of the refrigerant temperature is zero or below, and the remaining refrigerant liquid amount (Ms) exceeds zero; and in the second heating operation, controls the heating means on the basis of the remaining refrigerant liquid amount (Ms) and allows the refrigerant condensed in the compressor to evaporate.