Straw return into the field reduces the reliance on chemical fertilisers, promoting sustainable straw utilisation, and mitigating soil nodulation associated with excessive chemical fertiliser application. In this study, we investigated the effects of straw return on soil carbon and nitrogen fractions and the structural and functional diversity of soil microbial communities. We set up four treatments: S0 (0% straw returned to the field), S1/2 (50% straw returned), S1 (100% straw returned to the field), and S2 (200% straw returned to the field). The results revealed that most carbon and nitrogen fractions increased with increased amounts of straw returned into the field (soil organic carbon and total nitrogen: 6.4–39.8 % and 2.9–15.1 %, dissolved organic carbon and nitrogen: 1.4–37.9 % and 20.2–33.1 %, microbial biomass carbon and nitrogen: 26.3–129.3 % and 4.7–62.6 %, and light organic carbon and nitrogen: 52.4–155.9 % and 72.6–166.7 %). High-throughput sequencing and Biolog-ECO revealed that straw return significantly altered the relative abundance of bacterial and fungal communities and enhanced soil carbon metabolism. Redundancy and correlation analyses and partial least squares path modelling revealed that Proteobacteria (P = 0.002), Acidobacteriota (P = 0.004), Mortierellomycota (P < 0.05), and amino acid carbon sources (P < 0.01) were correlated with the changes in soil carbon and nitrogen fractions. Returning straw to the field significantly boosted the soil carbon and nitrogen fractions and affected soil carbon pools, particularly the active ones, by markedly influencing soil bacterial activity and consequently altering the soil carbon pool content. Our results provide a scientific and theoretical basis for enhancing nutrient content in dryland wheat calcareous brown soil, establishing a healthy soil ecological environment, and improving quality and efficiency in wheat production.