This study investigates the combined effects of tribenuron-methyl and urea on soil bacterial communities, greenhouse gases (GHGs) emissions, and carbon (C) and nitrogen (N) cycle-related functions. High-throughput sequencing revealed significant impacts on bacterial diversity and composition, with responses varying across different concentrations, sampling times, and the presence of urea. Tribenuron-methyl inhibited bacterial diversity at early sampling times but increased diversity after 60 days in the highest treatment. The impact on bacterial phyla varied across treatments, with notable fluctuations in Proteobacteria, Chloroflexi, and Verrucomicrobiota abundance. Tribenuron-methyl also caused distinct shifts in bacterial community structure, with pronounced effects in the presence of urea. Tribenuron-methyl significantly suppressed CO2 release but had no significant effect on N2O emissions. Urea addition enhanced N2O release without altering the impact of tribenuron-methyl. Functional pathway analysis indicated that tribenuron-methyl inhibited C cycle-related enzymes, particularly without urea addition, while its effect on N cycle-related enzymes was minimal. These findings highlight the dynamic interactions between herbicides, nitrogen fertilizers, and soil microbial processes, offering insights into their ecological impacts and implications for agricultural management.