The conversion of organic matter into oil and gas depends upon temperature and time, and the study of thermal maturation of oil-source rocks in a petroleum system is of importance for formation of a petroleum system. Based on the temperature data from 196 wells and thermal conductivity measurements of 90 core samples, altogether 35 heat flow data are obtained in the Junggar basin. The results show that the Junggar basin is a relatively “cold” basin at present, with a mean temperature gradient and heat flow of 21°C/km and 42 mW/m 2, respectively. Thermal history reconstructed from vitrinite reflectance data indicates that the Paleozoic formations experienced their maximum paleotemperature during the Permian and Triassic at higher paleoheat flow of about 85 mW/m 2 and that the basin then cooled down to the present low heat flow. The high paleoheat flow can be attributed to the Carboniferous to Permian rifting. The thermal evolution has a quite important effect on the formation and evolution of the petroleum systems in the Junggar basin, i.e. the Permian and the Jurassic systems. The Jurassic petroleum system is quite limited in space for the cooled thermal regime during the Meso-Cenozoic and the source rocks of the Middle–Lower Jurassic entered the oil window only along the North Tianshan foreland region, where the Jurassic is buried to the depth of 5–7 km at present. In contrast, the Middle–Lower Permian source rocks have experienced oil and gas generation in late Permian to Triassic, and the Permian petroleum system was formed prior to the Triassic when the upper Paleozoic formations reached their maximum paleotemperature due to higher paleoheat flow.