As soil structural units, soil aggregates are crucial in soil total nitrogen and organic carbon sequestration, which has been gradually discovered by scholars. However, how aggregates affect the storage of soil organic carbon and soil total nitrogen pools through aggregate proportion and their carbon and nitrogen content, remain unclear. Here, we examined soil aggregate composition, and the characteristics of aggregate-associated organic carbon and total nitrogen under different recovery years (15, 30, and 45 years) to explore the contribution in different sizes aggregates to soil carbon and nitrogen accumulation and its driving factors across different vegetation types of Natural grasslands (NG), Caragana korshinskii plantations (CK), and Robinia pseudoacacia plantations (RP) on the loess hilly areas. The results indicate that microaggregates dominated all soils, with the average proportions of 44.91 % in NG, 44.47 % in CK, and 42.19 % in RP. Yet, with the increase of recovery years, the proportion of microaggregates reduced and the proportion of macroaggregates rised. After vegetation restoration, the contents of carbon and nitrogen in soil and aggregates were increased. In addition, macroaggregate contributed more than 71.5 %, 67.0 %, and 67.9 % to organic carbon and total nitrogen stocks in NG, CK, and RP, respectively. The result that highlights the fact that macroaggregate is critical drivers of soil organic carbon and total nitrogen accumulation in different vegetation types. The growing percentage of macroaggregates was a key factor in the accumulation of soil organic carbon and total nitrogen stocks in NG, while the increasing percentage of macroaggregates and their associated carbon and nitrogen contents jointly led to an explicit increase in soil organic carbon and total nitrogen stocks in CK and RP. Overall, our findings revealed the soil organic carbon and total nitrogen accumulation process mediated by macroaggregates during vegetation recovery period on the Loess Plateau, providing a scientific basis for a deeper understanding of the potential of soil organic carbon and total nitrogen sequestration during the vegetation restoration in fragile habitats.