The Carboniferous Yanghugou Formation in the western margin of the Ordos Basin exhibits significant potential for oil and gas exploration. However, due to the influence of complex tectonic activities, there are substantial variations in stratigraphic thickness and depositional environments across the formation. The lack of a systematic source–sink comparative study has resulted in an unclear understanding of sediment sources and paleogeographic patterns, impacting the exploration for hydrocarbon accumulations. We conducted a comprehensive study of the source–sink system characteristics and paleogeography in the research area through field outcrop observations and drilling core sampling. By utilizing detrital zircon U–Pb geochronology and geochemistry, paleocurrent directions, lithofacies types, and sedimentary features, we delve into the understanding of the source–sink systems. Four major source–sink regions in the research area were identified: the Alxa, Yinshan, Alxa–Yinshan mixed and Qilian source–sink regions. The Alxa source–sink region formed a transitional delta-barrier-island sedimentary system. The northern part of the Yinshan source–sink region developed a transitional tidal-controlled delta-tidal-flat sedimentary system, while the southern deep-water area developed a shallow marine to semi-deep marine shelf sedimentary systems. The sediments of Alxa–Yinshan mixed source–sink region were deposited in a transitional tidal-controlled delta-tidal-flat barrier-island system. The Qilian source–sink region is characterized by small tidal-controlled delta-barrier-island system. From the analysis of the source–sink systems, it is inferred that the Alxa Block and the North China Craton had already merged before deposition of the late Carboniferous Yanghugou Formation. The delta sand bodies in the Alxa–Yinshan mixed source–sink region have the highest compositional and structural maturity, the best reservoir performance, and the great exploration potential.