The lacustrine organic-rich fine-grained sedimentary rocks of the Early Cretaceous Bayingebi Formation are widely distributed in the Yin'e Basin and they have become important source rocks for oil and gas exploration. To reveal the influence of paleoclimate warming event on sedimentary environment evolution and organic matter sources, the petrological and molecular geochemical analyses of the upper member of the Bayingebi Formation (K1b2) were carried out using optical microscopy, X-ray diffraction, scanning electron microscopy, Rock-Eval pyrolysis and gas chromatography–mass spectrometry, in order to establish the paleoecological models of the Early Cretaceous freshwater and saline lakes. The oil shale and dark mudstone of K1b2 are both in the immature-early mature stage and have good potential for hydrocarbon generation, with a dominance of type I and type II1 kerogen. Two types of primary dolomite were found in this formation: microcrystalline dolomite with uniform structure, and the microbially originated spherical dolomite aggregates. The K1b2 can be divided into four units based on its lithology and logging curve characteristics. Unit II was deposited in the peak of lake development, under the warm-humid paleoclimate with abundant annual precipitation. There was greater influx of freshwater than other units, which resulted in the unstable stratification of the water column and less reducing condition of the lake bottom water body. Lower aquatic organisms and vascular plants were unprecedentedly prosperous, which were indicated by short-term thriving phenomena of telalginite, and the large input of terrestrial OM and highest abundance of the OM compared to other units. A lake water salinization event occurred during the sedimentation period of Unit III under the cooling climate, causing a transition from a freshwater lake to a high-salinity lake with reducing condition and stable stratification of the water column. Salinity of lake water increased the competitiveness of salt-tolerant algae and bacteria. The salty environment is beneficial for the thriving of single to halophilic genus of microorganism and lead to significantly lower abundance of telalginite. The biological sources of OM were mainly bacteria, algae and emergent plants, with limited contribution of terrestrial higher plants. The anoxic alkaline environment and high salinity condition at the lake bottom were beneficial for the formation of carbonate minerals and the preservation of OM. This were characterised by medium abundance of OM and high hydrocarbon generation potential. The study on the petrological and molecular geochemical characteristics of these organic-rich fine-grained sedimentary rocks is of great significance for investigating the genetic mechanisms and resource potential of oil and gas.