The Jimsar Sag is an important shale oil exploration target area in the Junggar Basin, northwestern China. The Permian Lucaogou Formation, with a thickness of 200–300 m, is the primary exploration target. High-frequency variation in lithology is a typical feature of the Lucaogou Formation, reflecting the fluctuation of the depositional environment and organic matter enrichment. The evolution of the depositional environment and accumulation mechanism of organic matter still need to be elucidated for the Lucaogou Formation. High-resolution sampling of the entire Lucaogou Formation was applied to a 248 m long core from Well JX in the Jimsar Sag to examine the depositional environment and organic matter enrichment. The findings unveiled that the Lucaogou Formation was deposited under a hot and arid climate, within the confines of a closed saline paleo-lake, where sediments endured an extended period of anoxic conditions, displayed periodic oscillations in paleo-temperature and paleo-salinity values over time, alongside a continuous rise in paleo-water depth. The predominant source lithology of the Lucaogou Formation is felsic igneous rock. Small-scale transgression and hydrothermal sedimentation occurred during the deposition of the Lucaogou Formation. The prevailing hot climate and enduring reducing environment fostered ideal circumstances for the enrichment of organic matter in the Lucaogou Formation. Due to different sedimentary environments and enrichment mechanisms, organic matter is enriched in two modes in the Lucaogou Formation.