Under a full straw returning system, the relationship between soil bacterial community diversity and straw decomposition, yield, and the combined application of slow-release nitrogen and urea remains unclear. To evaluate these effects and provide an effective strategy for sustainable agricultural production, a 2-year field positioning trial was conducted using maize as the research object. Six experimental treatments were set up: straw returning + no nitrogen fertilizer (S1N0), straw returning + slow-release nitrogen fertilizer:urea = 0:100% (S1N1), straw returning + slow-release nitrogen fertilizer:urea = 30%:70% (S1N2), straw returning + slow-release nitrogen fertilizer:urea = 60%:40% (S1N3), straw returning + slow-release nitrogen fertilizer:urea = 90%:10% (S1N4), and straw removal + slow-release nitrogen fertilizer:urea = 30%:70% (S0N2). Significant differences (p < 0.05) were observed between treatments for Proteobacteria, Acidobacteriota, Myxococcota, and Actinobacteriota at the jointing stage; Proteobacteria, Acidobacteriota, Myxococcota, Bacteroidota, and Gemmatimonadota at the tasseling stage; and Bacteroidota, Firmicutes, Myxococcota, Methylomirabilota, and Proteobacteria at the maturity stage. The alpha diversity analysis of the soil bacterial community showed that the number of operational taxonomic units (OTUs) and the Chao1 index were higher in S1N2, S1N3, and S1N4 compared with S0N2 at each growth stage. Additionally, the alpha diversity measures were higher in S1N3 and S1N4 compared with S1N2. The beta diversity analysis of the soil bacterial community showed that the bacterial communities in S1N3 and S1N4 were more similar or closely clustered together, while S0N2 was further from all treatments across the three growth stages. The cumulative straw decomposition rate was tested for each treatment, and data showed that S1N3 (90.58%) had the highest decomposition rate. At the phylum level, straw decomposition was positively correlated with Proteobacteria, Actinobacteriota, Myxococcota, and Bacteroidota but significantly negatively correlated with Acidobacteriota. PICRUSt2 function prediction results show that the relative abundance of bacteria in soil samples from each treatment differed significantly. The maize yield of S1N3 was 15597.85 ± 1477.17 kg/hm2, which was 12.80 and 4.18% higher than that of S1N1 and S0N2, respectively. In conclusion, a combination of slow-release nitrogen fertilizer and urea can enhance the straw decomposition rate and maize yield by improving the soil bacterial community and structure within a full straw returning system.