Context The Songnen Plain is a crucial grain-producing region in China, and its western area, influenced by natural conditions and long-term human activities, faces severe issues of soil salinisation. In recent years, soil organic carbon (SOC) in saline-alkali soils has gained increasing attention as a material foundation for grain production and an essential carbon sink for mitigating climate change. However, the driving factors behind regional-scale changes in SOC in saline-alkali soils remain unclear. Aims This research was conducted to assess changes in soil organic carbon stocks and identify main driving factors in saline soils at 40-years scale. Methods Taking Tongyu County in the western part of the Songnen Plain as a case study, this research explored the spatiotemporal variation of soil organic carbon density (SOCD) and soil organic carbon storage (SOCS) from 1982 to 2022 using GIS. Random forest regression and structural equation modelling were employed to identify environmental factors influencing SOCD distribution in different soil layers. Key results (1) From 1982 to 2022, the average SOCD in the surface, subsurface, and bottom soil layers decreased by 0.65, 0.34, and 0.46 kg m−2, respectively, resulting in a total carbon storage reduction of 12.93 Tg C. (2) In 1982, the vertical distribution of SOCD was higher at the top and bottom layers and lower in the middle; however, by 2022, it exhibited a gradual decrease layer by layer. (3) Topographic factors only influenced surface SOCD, while the influence of environmental humidity and land use on SOCD decreased with increasing depth. Conclusions These findings provided valuable scientific insights for implementing regional soil carbon sequestration and soil nutrient conservation measures.