Thick layers of Palaeozoic shales are considered the potential sources of N 2 in natural gas reservoirs of the North German Basin. The nitrogen geochemistry of shale samples from five wells in northern Germany has been investigated using elemental analysis, stable isotope mass spectrometry and open system non-isothermal pyrolysis (temperature programmed pyrolysis). A combination of pyrolysis and on-line isotopic analysis of the liberated N 2 was used to identify variations in the isotopic composition of nitrogen-containing precursor species in the shales. Proportions of organic and inorganic nitrogen were assessed via pyrolysis of bulk samples and the corresponding demineralized kerogen concentrates. Total nitrogen content of the samples ranged between 640 ppm and 2350 ppm (0.64 and 2.35 mg N/g rock). Pyrograms of Namurian A and B shales indicated a clear facies trend from marine sediments to paralic and terrestrial facies. The isotopic composition of the liberated N 2 varied with temperature. The isotope trends imply the presence of several distinct precursor species with different isotope signatures.