The subject of the invention are new forms of nanoiron or zero-valent iron doped with boron, prepared with the method based on the invention, with the ability to fix oxygen in any environment, even an anhydrous one. In the second aspect, the subject of the invention is the method of oxygen scavenging both in a packaging containing water, as well as in an anhydrous environment. In the third aspect, the subject of the invention are nanocomposites containing nanoiron prepared according to the invention, characterised by the ability to fix oxygen in an environment containing water, as well as in an anhydrous environment. In the fourth aspect, the subject of the invention are iron oxygen scavengers in packaging, based on nanoiron or zero-valent iron doped with boron, prepared with the method based on the invention, with the ability to fix oxygen in an environment containing water, as well as in an anhydrous environment.