Productivity in continuous rice cropping agroecosystems (RR) is lower than in rice-pasture rotation agroecosystems with pastures based on legumes (RP). This may be attributed to changes in soil carbon (C) and nitrogen (N) levels. However, there is a lack of quantitative information about the contribution of the legume crop in RP agroecosystems in terms of soil quality indicators. The current study analyzed an RR and an RP in order to contribute to the understanding of the underlying processes involved in C and N dynamics in the soil-plant environment, finding better soil quality indexes in RP than in RR, and an interaction between N and C parameters. The percentage of total N explained 90 % of the C pool index (CPI) variability, and 72 % of the percentage of particulate organic C (%POC) variability. Furthermore, a biological N fixation (BNF) study performed in RP showed that almost 80 % of the N content in the aerial biomass of Lotus corniculatus plants originated from the legume–rhizobia symbiosis. Taken together, our results suggest that the soil N derived from the BNF associated with L. corniculatus plants could be a key factor for increasing soil C content, thereby improving soil structure.