Soil stoichiometric ratios serve as valuable indicators for the composition and quality of soil organic matter. While available studies predominantly examine the soil stoichiometric ratios of carbon (C), nitrogen (N), and phosphorus (P), limited attention has been paid on the influence of forest restoration on soil stoichiometric ratios of potassium (K), calcium (Ca), and magnesium (Mg). We analyzed soil K, Ca, and Mg content, as well as elemental stoichiometric ratios, in secondary forests with varying restoration periods (5, 8, 21, 27 and 40 years) and a natural forest, in order to examine the impact of forest restoration on soil stoichiometry. The results showed that soil C and N contents decreased significantly with increasing soil layers. Soil stoichiometric ratios decreased significantly with increasing soil layers except for K:P, Mg:P, and P:Ca. With the increases of forest restoration years, soil C and N contents significantly increased in 0-10 cm soil layer, Ca content in 10-20 cm soil layer significantly increased, and total P content in 20-40 cm layer significantly decreased. However, soil K and Mg contents in each soil layer did not differ among five restoration ages. With the increases of restoration years, C:Ca, N:Ca and P:Ca in 0-10 cm soil layer significantly increased, and C:P, N:P, and K:P in 20-40 cm soil layer significantly increased, while P:Ca in 20-40 cm soil layer significantly decreased. In all soil layers, K:P and Mg:P were significantly and negatively correlated with soil total P content, and C:Ca and N:Ca were significantly and positively correlated with soil mineral N, available P, and available K content. With the increases of the restoration ages of secondary forests, soils are gradually P-limited and progressively restricted by Ca element in the later years, leading to the limitation of multiple nutrients.