Understanding the properties of molecular nitrogen N2 at extreme conditions is the fundamental problem for atomistic theory and the important benchmark for the capabilities of first-principles molecular dynamics (FPMD) methods. In this work, we focus on the connection between the dynamics of ions and electronic excitations in warm dense N2. The restricted open-shell Kohn-Sham method gives us the possibility to reach relevant time and length scales for FPMD modeling of an isolated exciton dynamics in warm dense N2. Wannier localization sheds light on the corresponding mechanisms of covalent bond network rearrangements that stand behind polymerization kinetics. FPMD results suggest a concept of energy transfer from the thermal energy of ions into the internal energy of polymeric structures that form in warm dense N2 at extreme conditions. Our findings agree with the thermobaric conditions for the onset of absorption in the optical spectroscopy study of Jiang et al. [Nat. Commun. 9, 2624 (2018)].