Based on core and thin section data, the source rock samples from the Fengcheng Formation in the Mahu Sag of the Junggar Basin were analyzed in terms of zircon SIMS U-Pb geochronology, organic carbon isotopic composition, major and trace element contents, as well as petrology. Two zircon U-Pb ages of (306.0±5.2) Ma and (303.5±3.7) Ma were obtained from the first member of the Fengcheng Formation. Combined with carbon isotopic stratigraphy, it is inferred that the depositional age of the Fengcheng Formation is about 297–306 Ma, spanning the Carboniferous–Permian boundary and corresponding to the interglacial period between C4 and P1 glacial events. Multiple increases in Hg/TOC ratios and altered volcanic ash were found in the shale rocks of the Fengcheng Formation, indicating that multiple phases of volcanic activity occurred during its deposition. An interval with a high B/Ga ratio was found in the middle of the second member of the Fengcheng Formation, associated with the occurrence of evaporite minerals and reedmergnerite, indicating that the high salinity of the water mass was related to hydrothermal activity. Comprehensive analysis suggests that the warm and humid climate during the deposition of Fengcheng Formation is conducive to the growth of organic matter such as algae and bacteria in the lake, and accelerates the continental weathering, driving the input of nutrients. Volcanic activities supply a large amount of nutrients and stimulate primary productivity. The warm climate and high salinity are conducive to water stratification, leading to water anoxia that benefits organic matter preservation. The above factors interact and jointly control the enrichment of organic matter in the Fengcheng Formation of Mahu Sag.