A refrigeration and freezing device with fresh-keeping function by supplying nitrogen comprises a box body, a refrigerating and freezing chamber disposed inside the box body, a door to the refrigerating and freezing chamber, a control device and a nitrogen generator; wherein said nitrogen generator is disposed either inside or outside the box body of the refrigeration and freezing device, said nitrogen generator comprises an air inlet, an oxygen outlet, a nitrogen outlet, an air filter connected with the air inlet, a compressor, a pipe device for transmitting gas, at least one carbon molecular sieve absorber, at least one control valve to control different absorbers to work alternately, a nitrogen storage container, a nitrogen purifier, a pressure reducing valve for adjusting the pressure of the produced nitrogen, a ventilating muffler disposed on a pipe to the oxygen outlet and a control circuit.