An air-conditioning apparatus (100, 200, 300) including a refrigerant circuit formed by connecting a compressor, a refrigerant flow switching device, a first heat exchanger, a first expansion device, a heat medium relay unit, and second heat exchangers by using a pipe, the air-conditioning apparatus (100, 200, 300) being capable of, by an operation of the refrigerant flow switching device, switching between a cooling operation and a heating operation, the cooling operation being an operation in which a high-pressure refrigerant flows through the first heat exchanger so that the first heat exchanger operates as a condenser and in which a low-pressure refrigerant flows through at least one or all of the second heat exchangers (15, 26) so that the at least one or all of the second heat exchangers operate as an evaporator or evaporators, the heating operation being an operation in which a low-pressure refrigerant flows through the first heat exchanger so that the first heat exchanger operates as an evaporator and in which a high-pressure refrigerant flows through at least one or all of the second heat exchangers (15, 26) so that the at least one or all of the second heat exchangers (15, 26) operate as a condenser or condensers, the air-conditioning apparatus (100, 200, 300) comprising: an injection pipe through which the refrigerant is directed into a compression chamber of the compressor, which is in a compression process, from outside the compressor via an opening port formed in part of the compression chamber; a second expansion device that reduces a pressure of a refrigerant flowing from the second heat exchanger to the first heat exchanger via the first expansion device in the heating operation; a third expansion device disposed in the injection pipe; and a controller that controls an opening degree of at least one of the second expansion device and the third expansion device to adjust an amount of refrigerant that is to flow through the injection pipe, wherein the compressor, the refrigerant flow switching device, and the first heat exchanger are accommodated in an outdoor unit, the first expansion device and the second heat exchangers are accommodated in the heat medium relay unit, the outdoor unit and the heat medium relay unit are connected using two refrigerant pipes, the air-conditioning apparatus (100, 200, 300) has a heating main operation mode in which a high-pressure gaseous refrigerant flows through one of the two refrigerant pipes and an intermediate-pressure two-phase refrigerant flows through the other refrigerant pipe, and in which the second heat exchangers include a second heat exchanger operating as a condenser and a second heat exchanger operating as an evaporator, and a cooling main operation mode in which a high-pressure two-phase refrigerant flows through one of the two refrigerant pipes and a low-pressure gaseous refrigerant flows through the other refrigerant pipe, and in which the second heat exchangers include a second heat exchanger operating as a condenser and a second heat exchanger operating as an evaporator, and when an operation mode changes from the heating main operation mode to the cooling main operation mode, the controller decreases the opening degree of the third expansion device by a certain preset value and thereafter switches a state of the refrigerant flow switching device. an injection pipe through which the refrigerant is directed into a compression chamber of the compressor, which is in a compression process, from outside the compressor via an opening port formed in part of the compression chamber; a second expansion device that reduces a pressure of a refrigerant flowing from the second heat exchanger to the first heat exchanger via the first expansion device in the heating operation; a third expansion device disposed in the injection pipe; and a controller that controls an opening degree of at least one of the second expansion device and the third expansion device to adjust an amount of refrigerant that is to flow through the injection pipe, wherein the compressor, the refrigerant flow switching device, and the first heat exchanger are accommodated in an outdoor unit, the first expansion device and the second heat exchangers are accommodated in the heat medium relay unit, the outdoor unit and the heat medium relay unit are connected using two refrigerant pipes, the air-conditioning apparatus (100, 200, 300) has a heating main operation mode in which a high-pressure gaseous refrigerant flows through one of the two refrigerant pipes and an intermediate-pressure two-phase refrigerant flows through the other refrigerant pipe, and in which the second heat exchangers include a second heat exchanger operating as a condenser and a second heat exchanger operating as an evaporator, and a cooling main operation mode in which a high-pressure two-phase refrigerant flows through one of the two refrigerant pipes and a low-pressure gaseous refrigerant flows through the other refrigerant pipe, and in which the second heat exchangers include a second heat exchanger operating as a condenser and a second heat exchanger operating as an evaporator, and when an operation mode changes from the heating main operation mode to the cooling main operation mode, the controller decreases the opening degree of the third expansion device by a certain preset value and thereafter switches a state of the refrigerant flow switching device.