Medium and high sulfur coal gangue (MHSCG) presents challenges for safe application on civil engineering building materials due to the high content of unstable pyrite, of which the acidic oxidation products are against alkali cementitious materials. For better utilization of MHSCG, in this research, the carbonate-inducing bacterium Sporosarcina Pasteurii with its nutrient (urea) and mineralization source (calcium) was firstly explored in MHSCG desulfurization leaching tests, revealing the mechanism of desulfurization. On this basis, the desulfurizing modification on MHSCG sand by the bacteria under different factors of OD600, urea and calcium was conducted. Moreover, the gangue sand was used to prepare the desulfurized coal gangue mortar (DCGM) and the relevant mechanical properties and influence mechanisms were discussed. The results of total sulfur and XRD analysis show that Sporosarcina Pasteurii can accelerate the desulfurization in the 7-days-spraying modification. When the optimum dosages of OD600 (0.84) and urea solution concentration (1.41 mol/L) are adopted, the total sulfur can be reduced by 33.66∼36.32 %. The total sulfur has been further reduced by 7.69 % compared with group without calcium as calcium concentration is 1.56 mol/L. The introduction of calcium can enhance the mechanical properties of MHSCG and DCGM although the desulfurization treatment has a negative impact on them. The crushing index of MHSCG sand at most decreases 10.44 % from it without calcium. When OD600 is about 0.90, urea concentration is about 1.50 mol/L and calcium concentration is about 1.49 mol/L, the 28-d compressive strength of DCGM increases to 32.01 MPa, 76.85 % higher than group without calcium, and 23.54 % higher than raw-material preparing mortar.