• Different hydrocarbon-generating organisms occur in different saline palaeoenvironments. • The palaeoenvironment affects the hydrocarbon-generating organisms and source rock potential. • Source rocks deposited in saline environments have a low oil generation threshold and are characterised by multi-stage oil generation. • Saline environments form source rocks with a good organic matter type and high hydrocarbon generation potential. Saline lake basins are important Cainozoic petroliferous basins in China. There are significant differences in the palaeoenvironments of these basins. Different biological assemblages resulted in varying hydrocarbon generation characteristics and potential. Therefore, the bio-environmental interactions are key to understanding the oil generation from terrestrial organic matter. In this study, we investigated the organic petrology and geochemistry of the Palaeogene Shahejie Formation in the Dongpu Sag, Bohai Bay Basin, China. The depositional palaeoenvironment varied from saline to freshwater. Cyanobacteria and coccolithophores were deposited in the saline environment, and green algae and higher plant debris were deposited in the freshwater to brackish water environments. The algal biomass in the sediments increased with salinity. Thermal and pyrolysis experiments revealed differences in the hydrocarbon generation potential of the source rocks deposited in different sedimentary environments. The source rocks deposited in the saline water environment have a high hydrocarbon generation potential. Two immature to low-mature oil generation peaks were observed, which are mainly due to the pyrolysis of coccolithophores, cyanobacteria, and dinoflagellates. Only one oil generation peak was observed for source rocks deposited in the freshwater environment, which is mainly due to the pyrolysis of dinoflagellates and green algae. The hydrocarbon generation potential and two stages of oil generation of the source rocks deposited in the saline environment may be due to the type of hydrocarbon-generating organisms and the catalytic effect of the high-salinity diagenetic environment. The results show that the sedimentary environment of saline lake basins affects the hydrocarbon-generating organisms and hydrocarbon generation process.