Sedimentary organic matter (SOM) plays an important role in the transportation and transformation of various pollutants and the carbon cycle in aquatic and terrestrial ecosystems, especially for seagoing rivers. However, few studies have focused on the sources and factors of SOM in rivers under the significant pressure of high urbanization and industrialization. In this study, we adopted the molecular markers of n-alkanes and their proxies in the mainstream Haihe River to reveal the spatiotemporal distributions and biogenic and anthropogenic sources of SOM. The concentrations of Σ29n-alkanes, Σbiogenicn-alkanes, and Σanthropogenicn-alkanes were 4985.6 (127.5–26,296.6), 1872.1 (38.1–9216.9), and 3113.5 (89.4–18,259.7) ng·g−1 dw (dry weight), respectively. Hybrid sources of n-alkanes were found in this study. The composition distribution and proxies of n-alkanes showed that woody and herbaceous plants are the main sources of biogenic SOM, while incomplete fossil fuel burning and heavy oil emissions served as the main contributors to anthropogenic SOM in the mainstream Haihe River, especially through industrial activities. The average chain length of biogenic n-alkanes (ACLbio) was verified to quantify the relative contributions of biogenic sources of SOM and proxies; the average chain length of anthropogenic n-alkanes (ACLanthro), and the ratio of unit short‑carbon to unit long‑carbon anthropogenic n-alkanes (L/H) were verified to quantify the relative contributions of anthropogenic sources of SOM in the river system. Impacts from sedimentary geochemistry (such as total organic carbon (TOC) and grain size of sediments) on n-alkanes were explored, and the correlations of Σ29n-alkanes with TOC and grain size of the river sediment indicated that terrestrial organic matter was the main source of SOM, while emissions from incomplete combustion and intensive manufacturer activities should also not be neglected.