Veterinary antibiotics can enter into croplands with animal excrement and can have effects on nitrification and denitrification processes in the agricultural soils. A field experiment was conducted to evaluate the effect of sulfamethazine (SMZ) on N2O emissions, nitrification, denitrification, and related functional gene abundances within a paddy field. Five treatments were used in the experiment, namely, no fertilizer and no antibiotics applied (CK), and pig manure used as basal fertilizer plus urea applied as topdressing with the addition of 0, 5, 15, and 30 mg·kg-1 SMZ (SMZ0, SMZ5, SMZ15, and SMZ30, respectively). Soil and gas samples were collected and analyzed periodically throughout the rice growing season. The results showed that the SMZ did not change the seasonal pattern of N2O emissions. During the entire observation period, there was a significant difference in N2O fluxes between the SMZ15 and SMZ0 treatment (P<0.05), but there was no significant differences in N2O fluxes between the SMZ30, SMZ5, and SMZ0 treatment (P>0.05). Medium and high concentrations (SMZ15, SMZ30) increased the cumulative emissions of N2O at the average level, and these values were 3.47 and 4.67 times higher than that of the SMZ0 treatment, respectively; the soil NO3--N content also increased. Medium and high concentrations had a significant activation effect on the gene abundances of total soil bacteria 16S rRNA, ammonia-oxidizing archaea (AOA) amoA, and ammonia-oxidizing bacteria (AOB) amoA during the nitrification process and the gene abundances of nirK, nirS, and nosZ during the denitrification process (P<0.05), while the SMZ treatment with a low concentration had a slight inhibitory effect on the abundance of each gene. The ratios of abundance copies of 16S rRNA, AOA amoA, AOB amoA, and the genes of nirK, nirS, and nosZ treated by SMZ30, SMZ15, and SMZ0 were 1.58, 1.77, 2.15, 1.38, 1.33, 1.42, and 1.24, 1.37, 1.08, 1.65, 1.11, 1.64, respectively, at the average level. The abundance ratios of the six above genes treated by SMZ5 and SMZ0 were less than one and only 0.80, 0.99, 0.92, 0.76, 0.76, and 0.77, respectively. The N2O fluxes were significantly and positively correlated with the abundances of the nirK gene (P<0.01), thus indicating that SMZ had an effect on N2O emissions by influencing the activity of denitrifying bacteria. Therefore, the pollution of farmland by veterinary antibiotics should not be ignored, and the use of antibiotics should be controlled reasonably at the source, so as to reduce the environmental and ecological risks.