Since the Xiagou Formation was confirmed to be the primary source rock of the crude oil discovered in the Yumen oilfield, geologists have performed many studies on the sedimentology of the formation, source rock evaluation and migration, as well as petroleum accumulation. In this study, the carbonate-bearing mudstones were investigated using synthetic organic and inorganic geochemical analyses to reconstruct the paleo-environment and study the origin of organic matter during deposition in correlation with organic matter enrichment. The analysed samples have total organic carbon (TOC) and S-1 + S-2 values in the range of 0.20-3.39 wt% and 0.07-19.50%, respectively, which indicate fair to good hydrocarbon potential. Biomarker studies on the pyrolysis data of the samples suggest that the predominant origin of the organic matter is terrigenous high plants with partial aquatic algae and micro-organisms, primarily oil- and gas-prone. The trace elements P and Ba are considered to be the main proxies for paleoproductivity, and values for the two elements hosted in samples range from 48 to 1724ppm (a mean of 658 ppm) and from 322 to 1701ppm (a mean of 550.34 ppm), respectively, which indicates that the sediments in the Xiagou Formation have high paleoproductivity. Additionally, organic geochemical studies reveal that the sediments were deposited in a lacustrine environment with brackish water (low C-31-22R-homohopane/C-30-hopane ratios; moderate gammacerane and -carotane), which is consistent with the medium degree of the Sr/Ba ratio, which ranges from 0.22 to 1.42 (a mean of 0.64). Furthermore, the wide range of Cu/Zn and Rb contents are important indicators of a suboxic to relatively anoxic paleoredox condition. This outcome is consistent with the biomarker parameter Pr/Ph, which ranges from 0.05 to 1.37. Moreover, the major oxides and trace elements [high Fe/Mn, low Mg/Ca, low CIA and the plot of SiO(2)vs (Al2O3 + K2O + Na2O)] also indicate that the sedimentary paleoclimate was semiarid to arid. Lack of correlation between TOC content and paleo-environment (suboxic, brackish and semiarid) or productivity indicators indicates that the accumulation of organic matter was controlled by combined action, rather than a single factor, such as redox condition or productivity.