The shale sedimentary environment is crucial for evaluating shale gas reservoirs and sweet spot zones. The Xiahuayuan Formation in the Xuanlong Depression of the Yanshan area is an important exploration and development region for shale gas due to its multi-layer dark shale. The paleosedimentary environment and organic matter accumulation mechanism of organic-rich shale were discussed through geochemical methods such as total organic carbon (TOC) content and elemental analysis. The results indicate that the shale exhibits a high TOC content. The Mo content and the P/Al and P/Ti ratios indicate that the primary productivity of the ancient lake is high. The Ceanom, V/(V + Ni) ratio and MoEF-UEF covariation model reveal that the sedimentary environment of shale is characterized by anoxic conditions. The ratios of K/Al and Ti/Al suggest significant variations in the input of fine-grained clay clastics and terrigenous clastics. The Ca/(Fe + Ca) and Sr/Ba ratios suggest that the paleowater was a freshwater environment. The paleoclimatic conditions, as indicated by CIA, Sr/Cu, and C-value, suggest a range from semi-humid to humid. The ratios of Rb/K and Mn/Ti reflect that the water primarily existed in a shore–shallow lake environment. The correlation analysis between organic matter accumulation and sedimentary environment parameters indicates that the primary factors influencing the organic matter accumulation in the Xiahuayuan Formation shale are redox conditions, terrigenous clastic input, paleoclimate conditions, and paleowater depth. The organic matter accumulation is characterized by a “preservation condition” pattern. This study provides theoretical support for the accumulation mechanism, potential evaluation of resources, and optimal selection of favorable regions for Jurassic shale gas in the Xuanlong Depression.