Soil salinization, a significant global challenge, threatens sustainable development. This study explores the potential of magnetized ionized water irrigation and Bacillus subtilis application to mitigate this issue. The former method is hypothesized to enhance soil salt leaching, while the latter is expected to improve soil nutrient availability, thereby increasing microbial diversity. To address the unclear impact of these interventions on soil quality and cotton productivity, this study employs four different experimental methods: magnetized ionized water irrigation (M), application of 45 kg ha-1B. subtilis (B), a combination of 45 kg ha-1B. subtilis with magnetized ionized water irrigation (MB), and a control treatment with no intervention (CK). This study aims to clarify the effects of these treatments on soil bulk density (BD), field capacity (FC), salinity and alkalinity, nutrient content, microbial activity, and cotton crop yield and quality. Additionally, it aims to evaluate the efficacy of these methods in improving saline soil conditions by developing a soil quality index. The results showed that using magnetized ionized water for irrigation and applying B. subtilis, either alone or together, can effectively lower soil pH and salt levels, enhance microbial diversity and abundance, and improve the yield and quality of cotton. Notably, B. subtilis application significantly decreased BD and enhanced FC and nutrient content (p < 0.05). A correlation was found where soil nutrient content decreased as pH and salt content increased. Furthermore, a strong correlation was observed between the major soil bacteria and fungi with BD, FC, and salt content. Comparatively, M, B, and MB significantly boosted (p < 0.01) the soil quality index by 0.21, 0.52, and 0.69 units, respectively, and increased (p < 0.05) cotton yield by 5.7%, 14.8%, and 20.1% compared to CK. Therefore, this research offers eco-friendly and efficient methods to enhance cotton production capacity in saline soil.