Although afforestation of farmlands has been proposed as an effective method of carbon(C) sequestration, there remain uncertainties that deter us from developing a clear picture of C stocks in plantation ecosystems.This study investigated the dynamics of stand structure and plant diversity, and C and nitrogen(N) pools in trees,herbs, litter, and soil(0–100 cm depth) in black locust plantations aged 9, 17, 30, and 37 years, and in newly abandoned farmlands as pre-afforestation sites, on the Loess Plateau, China. Stand density decreased significantly, while tree diameter at breast height and height increased during stand development. The dominant species of the herb layer differed with age. Afforestation resulted in slight increases in tree C and N storage in plantations from 9 to 30 years of age, and then significantly increased from 30 to 37 years. Compared to pre-afforestation, C and N storage in soil decreased to minimum values in stands aged 17 and 9 years, respectively. The soil re-accumulated C and N during stand development, attaining equilibrium levels similar to those in pre-afforestation when stands reached about 30 years of age. Soil C and N storage in 37-year stands were 29 and 16% higher, respectively, than in pre-afforestation levels. However, C and N concentrations in the subsoil(20–40 cm) were still less than the preafforestation levels for stands of all ages(from 9 to 37 years). The relative contribution to the total ecosystem C and N pools increased in trees and decreased in soil during the observed period. Our results indicate that afforestation reduced soil C and N storage during the early stages of stand development. We conclude that the growing phase of an afforested stand over its initial 30 years is important for C and N sequestration by black locust due to the C and N storage that result from recovered soil quality and an increase in tree biomass.