A scientific exploration well (CK1) was drilled to expand the oil/gas production in the western Sichuan depression, SW, China. Seventy‐three core samples and four natural gas samples from the Middle–Late Triassic strata were analyzed to determine the paleo‐depositional setting and the abundance of organic matter (OM) and to evaluate the hydrocarbon‐generation process and potential. This information was then used to identify the origin of the natural gas. The OM is characterized by medium n‐alkanes (nC15–nC19), low pristane/phytane and terrigenous aquatic ratios (TAR), a carbon preference index (CPI) of ∼1, regular steranes with C29 > C27 > C28, gammacerane/C30hopane ratios of 0.15–0.32, and δDorg of −132‰ to −58‰, suggesting a marine algal/phytoplankton source with terrestrial input deposited in a reducing–transitional saline/marine sedimentary environment. Based on the TOC, HI index, and chloroform bitumen “A,” the algal‐rich dolomites of the Leikoupo Formation are fair–good source rocks; the grey limestones of the Maantang Formation are fair source rocks; and the shales of the Xiaotangzi Formation are moderately good source rocks. In addition, maceral and carbon isotopes indicate that the kerogen of the Leikoupo and Maantang formations is type II and that of the Xiaotangzi Formation is type II–III. The maturity parameters and the hopane and sterane isomerization suggest that the OM was advanced mature and produced wet–dry gases. One‐dimensional modeling of the thermal‐burial history suggests that hydrocarbon‐generation occurred at 220–60 Ma. The gas components and C–H–He–Ar–Ne isotopes indicate that the oil‐associated gases were generated in the Leikoupo and Maantang formations, and then, they mixed with gases from the Xiaotangzi Formation, which were probably contributed by the underlying Permian marine source rocks. Therefore, the deeply‐buried Middle–Late Triassic marine source rocks in the western Sichuan depression and in similar basins have a great significant hydrocarbon potential.