Mercury pollution from natural and anthropogenic sources demands effective remediation. This study focuses on optimizing a chemical stabilization approach using sulfur-containing compounds to create stable mercury sulfide (HgS) and immobilize elemental mercury in polluted soils. We propose using xanthan gum biopolymer to enhance the in-situ delivery of sulfide microparticles, overcoming soil heterogeneities due to its non-Newtonian behavior. Stability tests indicated that increased biopolymer concentration enhances particle stability due to the viscous and shear-thinning behavior of the polymer solutions. Various combinations (12 solutions) of xanthan polymer, pyrite microparticles, and sulfide-containing reagents were tested in batch experiments. Pyrite microparticles slightly reduced the xanthan solution's viscosity while retaining its non-Newtonian character. All solutions effectively transformed liquid mercury droplets into cinnabar, demonstrating successful mercury stabilization. Notably, solutions containing PIAX and SIPX, xanthate organosulfur compounds, significantly reduced the dissolved concentration of elemental mercury. Column experiments demonstrated xanthan gum's superior performance for in-situ injection of pyrite microparticles and sulfide mixtures into the soil compared to conventional water injection. At a polymer concentration of 4 g/L, a stable displacement front and an 88 % recovery of the initially injected particle-suspension density were achieved. The combined effects of xanthate's floating behavior and xanthan gum's shear-thinning nature substantially enhanced the delivery of pyrite microparticles in porous media for soil mercury remediation. This combination reduced the aqueous elemental mercury concentration in artificially polluted sand by up to 97 %, particularly with the xanthate organosulfur compound, PIAX. Xanthate has a higher potential to react with elemental mercury to form cinnabar compared to sodium thiosulfate. Additionally, the pyrite microparticles, rendered hydrophobic in xanthate solutions, integrated into the mercury droplets, forming a black paste. This study introduces a promising approach for efficient elemental mercury stabilization in contaminated soils by integrating biopolymers, reactive soluble compounds, and pyrite microparticles for sustainable decontamination.