A refrigeration and freezing device with fresh-keeping function by supplyingnitrogen comprises a box body, a refrigerating and freezing chamber disposedinside the box body, a door to the refrigerating and freezing chamber, acontroldevice and a nitrogen generator; wherein said nitrogen generator is disposedeitherinside or outside the box body of the refrigeration and freezing device, saidnitrogengenerator comprises an air inlet, an oxygen outlet, a nitrogen outlet, an airfilterconnected with the air inlet, a compressor, a pipe device for transmittinggas, atleast one carbon molecular sieve absorber, at least one control valve tocontroldifferent absorbers to work alternately, a nitrogen storage container, anitrogenpurifier, a pressure reducing valve for adjusting the pressure of the producednitrogen, a ventilating muffler disposed on a pipe to the oxygen outlet and acontrolcircuit.