Soil salinization is a critical environmental issue restricting agricultural production. Deep return of straw to the soil as an interlayer (at 40 cm depth) has been a popular practice to alleviate salt stress. However, the legacy effects of straw added as an interlayer at different rates on soil organic carbon (SOC) and total nitrogen (TN) in saline soils still remain inconclusive. Therefore, a four-year (2015–2018) field experiment was conducted with four levels (i.e., 0, 6, 12 and 18 Mg ha–1) of straw returned as an interlayer. Compared with no straw interlayer (CK), straw addition increased SOC concentration by 14–32 and 11–57% in the 20–40 and 40–60 cm soil layers, respectively. The increases in soil TN concentration (8–22 and 6–34% in the 20–40 and 40–60 cm soil layers, respectively) were lower than that for SOC concentration, which led to increased soil C:N ratio in the 20–60 cm soil depth. Increases in SOC and TN concentrations in the 20–60 cm soil layer with straw addition led to a decrease in stratification ratios (0–20 cm:20–60 cm), which promoted uniform distributions of SOC and TN in the soil profile. Increases in SOC and TN concentrations were associated with soil salinity and moisture regulation and improved sunflower yield. Generally, compared with other treatments, the application of 12 Mg ha–1 straw had higher SOC, TN and C:N ratio, and lower soil stratification ratio in the 2015–2017 period. The results highlighted that legacy effects of straw application as an interlayer were maintained for at least four years, and demonstrated that deep soil straw application had a great potential for improving subsoil fertility in salt-affected soils.