Halosulfuron-methyl (HSM) is a new and highly effective sulfonylurea herbicide widely used in weed control, but its residue in the environment poses a potential risk to soybean. Soybean–rhizobium symbiotic nitrogen fixation is crucial for sustainable agricultural development and ecological environment health. However, the impact of HSM on the symbiosis between soybean and rhizobium is unclear. In this study, the effects of HSM on the soybean–rhizobium symbiotic process and nitrogen fixation were investigated by means of transcriptomic and physiological analyses. Treatment with a concentration of HSM less than 0.5 mg L−1 had no effect on rhizobium growth, but significantly reduced nodules number, the biomass of soybean nodules, and nitrogenase activity in root nodules (P < 0.05). Transcriptomic analysis showed that differentially expressed genes (DEGs) involved in NH4+ assimilation were significantly downregulated (P < 0.05). In addition, the activities of NH4+ assimilation enzymes were markedly reduced. This result was further confirmed by the accumulation of NH4+ in root nodules, indicating that the inhibition of nitrogen fixation by HSM may be caused by excessive NH4+ accumulation in root nodules. Furthermore, DEGs involved in flavonoid synthesis, phytohormone biosynthesis, and phytohormone signaling transduction were significantly downregulated (P < 0.05), which was consistent with the decrease in flavonoid and phytohormone contents determined in this study. These results suggested that HSM may inhibit soybean nodulation by inhibiting flavonoid synthesis in soybean roots, disrupting the balance of plant endogenous hormones in roots during symbiosis, and blocking the transmission of hormone signals during the symbiosis. Our findings provide new insights into the effects of HSM on the legume–rhizobium nodule symbiotic process.