A method for producing ammonia from natural gas that comprises heating natural gas and steam in a process line and subjecting them to primary reforming, subjecting resulting converted gas to secondary reforming that operates on a mixture of steam, air, and oxygen, and then sending the converted gas to carbon dioxide conversion, purification of resulting syngas from carbon dioxide, methanating purified syngas, then synthesizing ammonia, while utilizing the purge gas generated in ammonia synthesis process as a fuel to increase temperature of the natural gas and steam, wherein in the fuel line, natural gas and steam are heated and subjected to primary reforming, resulting converted gas is subjected to secondary reforming using a mixture of steam, air, and oxygen, whereafter resulting converted gas is sent to carbon dioxide conversion, resulting syngas is purified from carbon dioxide, purified syngas pressure is reduced and a portion of the purified syngas is used as a fuel to heat up the natural gas and steam in the fuel line, while another portion, together with purge gas, is used as a fuel to heat up the natural gas and steam in the process line.