Deep–ultradeep carbonates have long been a hotspot in the field of oil and gas exploration in the Tarim Basin. The hydrocarbon source rock distribution is a key factor restricting deep–ultradeep oil and gas exploration, and in particular, there has been controversy over the sources of the deep oil and gas in the Tarim Basin. In addition, the black shale sediments of the Yuertusi Formation formed during the important transition period of the Precambrian/Cambrian and recorded globally significant climatic events. Research on this formation is of great scientific value for understanding the changes in the Earth's surface climate system during this major and critical transition period. Based on nine field sections, 36 wells, and 2D and 3D seismic data, this paper analyzes the sedimentary environment and hydrocarbon source rock distribution of the Yuertusi Formation in the Tarim Basin. The results show that the lower Cambrian Yuertusi Formation in the Tarim Basin can be divided into two third-order sequences (SQ1 and SQ2) and five fourth-order sequences (sq1-sq5), which experienced two primary transgressions during the deposition of sq2 and sq4. During the depositional period of sq2, hydrocarbon source rocks with the highest organic carbon content in the entire area formed under the influence of high paleoproductivity and upwelling currents. sq4 formed in the context of a second large-scale transgression, and the depositional center moved to the southwest. The organic matter content in sq4 is lower than that in sq2, but it features an extensive distribution and a large thickness. sq3 and sq5 are shallow-water deposits, primarily gray dolomite and algal dolomite with local argillaceous interlayers, that formed during marine regression phases. sq2 and sq4 of the Yuertusi Formation are primarily deep-water to shallow-water shelf sediments with stable thicknesses and are widely distributed in the slope area of the basin and on the shelf. These two sets of high-quality hydrocarbon source rocks indicate the huge hydrocarbon exploration potential of the deep Cambrian strata in the Tarim Basin. These research results can provide important scientific references for evaluating deep–ultradeep oil and gas resources in the Tarim Basin.