An air-conditioning apparatus comprising: a refrigerant circuit including, an outdoor unit having a compressor and an outdoor heat exchanger, a four-way valve and a plurality of indoor units each having an expansion valve capable of varying an opening degree and an indoor heat exchanger, the refrigerant circuit connecting the compressor, the outdoor heat exchanger, the expansion valve, and the indoor heat exchanger with refrigerant pipes through which a refrigerant circulates; a controller configured to control at least the opening degree of the expansion valve, an opening and closing valve configured to open and close a refrigerant passage and an expansion mechanism, wherein, in the refrigerant circuit, the opening and closing valve and the expansion mechanism are connected in series, while the serially connected opening and closing valve and the expansion mechanism are connected in parallel with the expansion valve, characterized in that the expansion mechanism has porous bodies capable of passing a refrigerant therethrough, and in that the controller includes an indoor degree-of-superheat control means configured to control the opening degree of the expansion valve in cooling operation and to fully close the expansion valve in order to stop the operation of the indoor unit, and in that the controller further includes an indoor degree-of-subcooling control means configured to control the opening degree of the expansion valve in heating operation and to fully close the expansion valve in order to stop the operation of the indoor unit, and further includes an opening and closing valve control means configured to open the opening and closing valve when the opening degree of the expansion valve is greater than a fully-closed state and is smaller than a specific opening degree, and to close the opening and closing valve when the opening degree of the expansion valve is equal to or greater than the specific opening degree or when the indoor unit is stopped and the expansion valve is fully closed. a refrigerant circuit including, an outdoor unit having a compressor and an outdoor heat exchanger, a four-way valve and a plurality of indoor units each having an expansion valve capable of varying an opening degree and an indoor heat exchanger, the refrigerant circuit connecting the compressor, the outdoor heat exchanger, the expansion valve, and the indoor heat exchanger with refrigerant pipes through which a refrigerant circulates; a controller configured to control at least the opening degree of the expansion valve, an opening and closing valve configured to open and close a refrigerant passage and an expansion mechanism, wherein, in the refrigerant circuit, the opening and closing valve and the expansion mechanism are connected in series, while the serially connected opening and closing valve and the expansion mechanism are connected in parallel with the expansion valve, characterized in that the expansion mechanism has porous bodies capable of passing a refrigerant therethrough, and in that the controller includes an indoor degree-of-superheat control means configured to control the opening degree of the expansion valve in cooling operation and to fully close the expansion valve in order to stop the operation of the indoor unit, and in that the controller further includes an indoor degree-of-subcooling control means configured to control the opening degree of the expansion valve in heating operation and to fully close the expansion valve in order to stop the operation of the indoor unit, and further includes an opening and closing valve control means configured to open the opening and closing valve when the opening degree of the expansion valve is greater than a fully-closed state and is smaller than a specific opening degree, and to close the opening and closing valve when the opening degree of the expansion valve is equal to or greater than the specific opening degree or when the indoor unit is stopped and the expansion valve is fully closed.