Polymeric nitrogen with single bonds can be created from the molecular form at high pressure and due to large energy difference between triple and single bonds it is interesting as an energetic material. Its structure and properties are, however, still not well understood. We studied amorphous nitrogen by ab initio simulations, employing molecular dynamics and evolutionary algorithms. Amorphous nitrogen was prepared at a pressure of 120 GPa by quenching from a hot liquid, by pressure-induced amorphization of a molecular crystal, and by evolutionary search. All three amorphous forms were found to be structurally similar. We studied in detail the structural evolution of the system upon decompression from 120 GPa to zero pressure at 100 K. At pressures above 100 GPa, the system consists mainly of 3-coordinated atoms (80 %) connected by single bonds while some short chains made of 2-coordinated atoms are also present. Upon decompression, the number of 3-coordinated atoms rapidly decreases below 60 GPa and longer chains are created. At 20 GPa the system starts to create also N2 molecules and the ultimate structure at p = 0 contains molecules inside a polymeric network consisting dominantly of longer chains made of 2-coordinated atoms.Besides structure, we also study vibrational and electronic properties of the system and estimate the amount of energy that could be stored in amorphous nitrogen at ambient pressure. arXiv:1804.09072v2 [cond-mat.mtrl-sci]