The influence of lithofacies on the composition of NSO (nitrogen-, sulfur- and oxygen- containing) compounds in unconventional petroleum systems has been investigated using examples of biogenic carbonate-rich Niobrara Shale, biogenic quartz-rich Barnett Shale and detrital clay-rich Posidonia Shale. The chosen sample sets all contain Type II marine kerogen in the peak–late oil window. Solvent extracts were analyzed using Fourier transform ion cyclotron resonance mass spectrometry (FT-ICR-MS), combined with atmospheric pressure photoionization in positive ion mode ((+)-APPI) and electrospray ionization in negative ion mode ((−)-ESI). Covering source and reservoir units, our study furthermore enables tracing the impact of lithofacies on primary petroleum migration within the Niobrara and Barnett shales.Siliciclastic Barnett and Posidonia shale extracts reveal higher proportions of NSO compounds confirming their generally higher retention capacities for polar organic compounds. However, different retention specificities of biogenic quartz- and clay-rich rocks are indicated by varying NSO compound compositions in their bitumen fraction: biogenic quartz preferentially preserves and retains organonitrogen compounds, while the more polar acidic organooxygen species are preferably retained by clay minerals. Extracts from the carbonate rocks contain a larger fraction of nonaromatic cyclic sulfoxides and amides that are likely formed by oxidation processes during maturation of organic matter.Fractionations induced by the intra-formation migration differ between the Barnett and Niobrara sample sets. While low-polarity organonitrogen species are retained in both Barnett (to a greater extent) and Niobrara source units, a preferential migration of highly alkylated and small acidic NSO components out of the source is only observed in the Niobrara samples.