This paper presents detrital modes, clay and carbonate cements and major and trace element contents of the sandstones from the lower Xiaganchaigou formation deposited during the Eocene/Oligocene transition in the Lenghu tectonic belt on the northern margin of the Qaidam Basin, NW Qinghai–Tibetan plateau. Our results show that the sandstones are mainly lithic feldspathic, with clay content varying from 4.1 to 42.5 vol. % (average 13.7 vol. %). These sandstones have low contents of Na2O, MgO, Al2O3, K2O, CaO and TiO2, with the average contents of 2.14 wt%, 0.78 wt%, 7.96 wt%, 2.11 wt%, 6.14 wt% and 0.15 wt%, respectively. The total content of major elements is < 30 wt%, indicating that the pore water was in an alkaline environment with high pressure, so that the decarboxylation reaction of the organic matter took place to generate a large amount of carbon dioxide with a loss of 13C. Consequently, the δ13C of the carbonate cement is negatively biased to − 6.4‰; the deep high temperature environment and the external fresh water leaching make the δ18O value of the carbonate cement gradually lose, reaching − 13.19‰, according to its precipitation temperature (78–108 °C) and pore water salinity (104–110), it is judged that carbonate cement is mainly formed in the middle diagenetic stage and early diagenetic stage. The rare earth elements are mainly authigenic by the results of ∑REE and Y/Ho, and the deposition characteristics of trace elements such as Zn, Th, U, Ni, Co, Cr, Sr/Cu, Ceanom, Ce/La, ∑REE, Eu/Eu*, La/Yb, V/(V + Ni) and the transformation of later diagenesis, combining the characteristic of the global climate and the influence of uplifting of the Qinghai–Tibetan Plateau, indicate that the lower Xiaganchaigou formation was in a dry, cold and anoxic reducing environment.