Recently, there has been an increasing focus on deep and ultradeep oil and gas exploration and development. The Upper Jurassic Qigu Formation (Fm.) in the Yongjin region, located in the central area of the petroleum-bearing Junggar Basin, develops typically deep and ultradeep hydrocarbon reservoirs, but there is currently limited knowledge of the geochemical characteristics and origins of the oils in the reservoirs. A comprehensive analysis of the molecular characteristics and carbon isotopes of the oil and extractable organic matter (OM) samples from the Qigu reservoirs, as well as source rocks from the Middle Permian lower Wuerhe and Lower Permian Fengcheng Fm., was carried out to elucidate the thermal maturity, biological sources, and biodegradation scale of the OM, as well as the depositional environment of the related source rocks. The results suggest that the Qigu oils originated primarily from source rocks formed in a hypersaline lacustrine environment with paleoredox conditions of bottom water ranging from reducing to suboxic conditions. Furthermore, the biological sources of oils predominantly originated from bacteria, followed by algae. The degradation scales range between 3 and 4, and the thermal maturity is in the oil window for the samples examined. The OM of the Permian source rocks in the Yongjin region are in the high thermal maturity stage due to their ultradeep burial, thereby providing limited information to oil and source correlation. By combining more than 1000 published data from the entire basin, significant differences between the Jurassic and Permian source rocks, as well as minor differences between the lower Wuerhe (i.e., the ratios of Pr/n-C17 of <0.5, Ph/n-C18 of 1.5, C27/C29 sterane of >0.4, and hopanoids/steranes of >1 as well as the higher C20/C23 Tri ratios) and Fengcheng source rocks (i.e., β-carotane/n-C max ratios of >0.1 and some samples with C28 steranes concentrations of <10% in the normalized concentrations of C27, C28, and C29 steranes), were observed, and the origins of the oils were determined. The oil-source correlation suggests that the oils most likely originated from the lower Wuerhe Fm. without strictly excluding the possibility of a contribution from the Fengcheng Fm.