Anthropogenic activities have resulted in rising atmospheric concentrations of carbon dioxide (CO2) and ozone (O3), exerting substantial direct and indirect impacts on soil biodiversity within agroecosystems. Despite the considerable attention given to the individual impacts of elevated CO2 and O3 levels, the combined effects on soil nematode communities have not been extensively explored. In this study, we investigated the interactive effects of elevated CO2 (+200 ppm, eCO2) and O3 (+40 ppb, eO3) levels on the abundance, diversity, and trophic composition of soil nematode communities associated with two rice cultivars (Nanjing 5055, NJ5055 and Wuyujing 3, WYJ3). Our findings revealed that soil nematodes had greater abundances under eO3, whereas eCO2 had no significant impacts. Conversely, both eCO2 and eO3, and their combination led to significant reductions in nematode generic richness, accompanied by a decline in the diversity particularly associated with the WYJ3 cultivar. Moreover, eCO2 and eO3 influenced nematode community composition and environmental factors, particularly for the WYJ3 cultivar. Both eCO2 and eO3 significantly increased soil nitrate levels. The changes in nematode community composition were related to soil nitrate levels, as well as nitrogen and carbon concentrations in rice plant roots. Furthermore, interactions between eCO2 and eO3 significantly impacted soil nematode abundance and trophic composition, revealing intricate consequences for soil nematode communities that transcend predictions based on single-factor experiments. This study unveils the potential impacts posed by eCO2 and eO3 on soil biodiversity mediated by rice cultivars, plant functional characteristics and soil feedback mechanisms, thereby underscoring the complex and interactive outcomes arising from concurrent drivers of climate change within the soil food web.