To uncover the reservoir characteristics and enrichment law of coal-measure gas in Julu sag, Hebei Province, and achieve co-exploration and co-mining, it is necessary to conduct a comprehensive analysis. In this study, we investigated the characteristics of coal-measure gas accumulation in the Taiyuan Formation and Shanxi Formation in the Julu area. This was achieved by collecting data on coal-measure source rocks and organic geochemistry, which were then combined with regional geological conditions. This study indicates that the coal seams and shales of Shanxi Formation and Taiyuan Formation in the study area serve as the primary source rocks. The predominant macerals found in coal rock are vitrinite. Furthermore, the organic matter type present in shale is primarily categorized as type II2, with the organic matter maturity falling within the immature–mature stage. Based on the simulation results of tectonic-burial history, thermal evolution history, and hydrocarbon generation history in the study area, it is evident that the coal-measure source rocks experienced their first peak of hydrocarbon generation during the Mesozoic era as a result of deep metamorphism. Subsequently, the area experienced uplift and erosion, leading to the release of coal-bearing natural gas. Since the Paleogene period, the coal-bearing source rocks have undergone sedimentary burial and entered the secondary hydrocarbon generation stage, resulting in significant production of oil and gas. Based on the analysis of gas content, buried depth, source rock thickness, and sealing conditions in the study area, it is evident that the potential of coal-measure gas resources in the study area is primarily comprised of shale gas with supplementary coalbed methane. It can be inferred that the deeper areas within the study area hold greater exploration prospects.