Soil organic carbon is a crucial parameter for assessing soil quality, and it significantly contributes to soil aggregation. However, the influence of different organic carbon components and groups on the formation of soil water-stable aggregates has not been thoroughly investigated. To examine it, a clay soil amended with two different types of organic matter (OM) at four input levels for 84 days. The ratio of peak area (RPA) of the mid-infrared (MIR) spectra was used to investigate the dynamic of specific compounds and soil aggregation during the decomposition of OM. The results showed three important aspects. Firstly, the amount and nature of OM input strongly influenced the formation of organic compounds during incubation, as well as the degree of soil aggregation. Furthermore, we observed that the C groups identified by MIR spectroscopy were highly dynamic. Thus, the approach of using a band of soil MIR spectra to infer the stability of a C group can be misleading. Secondly, the low C/N of alfalfa stimulated more microbial activity with 1.1 to 2.3 times more cumulative respiration than high C/N barley straw. The rapid degradation of alfalfa immediately formed water-stable aggregates and subsequently, the macroaggregates were reorganized by microbial activities and physical disturbance. In contrast, the slow decomposition of barley straw built up aggregates gradually in a hierarchical manner and in proportion to the amount of OM added. Alfalfa amendment caused a significant increase in the mean weight diameter (MWD) and a strong correlation with the RPA in the range of 1747–1500 cm−1 (r = 0.78). While aggregation due to barley straw treatment led a stronger relationship between MWD and RPA of 3000–2800 cm−1 (r = 0.89). The results suggest MIR spectra can be used to understand the dynamics of OM that build stable aggregates.