The study investigated the impact of adding equal carbon amounts of cotton stalks and biochar to soil on soil physical and chemical properties and nutrient transformation enzyme activities, aiming to support sustainable agriculture in drip-irrigated cotton fields in arid regions. The experiment included three treatments: no residue returning (CK), cotton stalk returning (ST, 6 t/hm2) and biochar returning (BC, 3.7 t/hm2). The results showed that both cotton stalks and biochar significantly increased the proportion of large soil aggregates compared with CK, the mean mass diameter and geometric mean diameter of aggregates were significantly improved, aggregate stability was improved, and soil porosity and water content were enhanced. Large aggregates and water content increased by 107.7%, 58.5% and 42.1%, 28.5%, but the soil bulk density was significantly reduced. Compared with CK, both treatments elevated soil cation exchange capacity (CEC), organic matter, total nitrogen, alkali-hydrolyzable nitrogen, available phosphorus and available potassium, CEC increased by 4% and 12%, with biochar being more effective in enhancing CEC, organic matter, carbon-nitrogen ratio, available phosphorus and available potassium. Cotton stalks were more effective in increasing total nitrogen and alkali-hydrolyzable nitrogen. Both treatments increased the activities of soil sucrase, β-glucosidase, cellulase, dehydrogenase and alkaline phosphatase, with cotton stalks also elevating urease and alkaline protease activities, while biochar reduced them. Correlation analysis indicated that total nitrogen and alkali-hydrolyzable nitrogen were primary factors promoting activities of sucrase, β-glucosidase, cellulase, dehydrogenase and alkaline phosphatase enzyme, while soil pH and bulk density inhibited them. Both treatments significantly enhanced the absorption of nitrogen, phosphorus and potassium in cotton, promoting growth and development, and increasing cotton seed yield by 12.6% for cotton stalks and 10.2% for biochar. In conclusion, returning cotton stalks and biochar to the soil improved soil structure, increased nutrient content and enzyme activities, and promoted nutrient absorption in cotton, leading to a significant increase in cotton seed yield.