Nanoporous silicon based materials with closed porosity filled with the sputtering gas have been recently developed by magnetron sputtering. In this work the physical properties (density and pressure) of molecular nitrogen inside closed pores in a SiO x N y coating are investigated for the first time using spatially resolved electron energy-loss spectroscopy (EELS) in a scanning transmission electron microscope. The paper offers a detailed methodology to record and process multiple EELS spectrum images (SIs) acquired at different energy ranges and with different dwell times. It is demonstrated an adequate extraction and quantification of the N-K edge contribution due to the molecular nitrogen inside nanopores. Core-loss intensity and N chemical bond state were evaluated to retrieve 2D maps revealing stable high density of molecular nitrogen (from 40 to 70 at./nm 3 ) in nanopores of different size (20 to 11 nm). This work provides new insights on the quantification of molecular N 2 trapped in porous nitride matrices that could be also applied to other systems.