The invention relates to a cold storage and heat storage type air conditioner, which comprises an outdoor unit module, a heat storage groove and an indoor unit module, wherein the outdoor unit module comprises a compressor, an electromagnetic valve, an electronic expansion valve, a one-way valve and an outdoor heat exchanger, a heat exchanger and heat storage media are contained in the heat storage groove, the indoor unit module comprises an indoor heat exchanger and an electronic expansion valve, the compressor, the outdoor heat exchanger, the electromagnetic valve, the one-way valve, the electronic expansion valve and the indoor heat exchanger are sequentially connected for forming a refrigeration loop, the heat storage groove is directly connected with the outdoor unit module, the outdoor heat exchanger is connected with the end A of the heat storage groove through the electromagnetic valve and the one-way valve, the end A of the heat storage groove is connected to a position between the one-way valve and the electronic expansion valve through the electronic expansion valve, the end B of the heat storage groove is connected with an air return pipe of the compressor through the electromagnetic valve, and the end B of the heat storage groove is connected to a position between the one-way valve and the electronic expansion valve through the one-way valve. The cold storage and heat storage type air conditioner has the advantages that during normal refrigeration operation and heat generation operation, refrigerants do not need to flow through the heat storage groove, and the system energy efficiency is effectively improved.