Geopolymers, which are composed of solid waste, are eco-friendly binders characterized by rapid hardening and high strength. Using geopolymers to stabilize saline soils presents a sustainable solution for soil improvement. This study investigated two geopolymers, HG and SG, composed of a coal gangue-slag composite, to improve saline soils. The stabilized soils were prepared by blending geopolymers with saline soils in varying proportions of 10, 20, 30, and 40% by weight. The strength of the stabilized soils was evaluated based on the geopolymer dosage. Moreover, we examined the strength of the stabilized soils with curing time and elucidated the underlying mechanisms using microscopic analyses including XRD, FTIR, and SEM. This study revealed that: 1) the SG geopolymer outperformed the HG geopolymer in soil strength enhancement; 2) cohesion of the stabilized soil increased as the dosage and curing time increased, while the internal friction angle showed no clear trend; 3) the geopolymer stabilized soil mainly contained quartz, C-A-S-H, N-A-S-H, and C-N-A-S-H gels, and these gels were distributed on the soil particle surface and within the interstitial voids, improving the soil strength, and 4) in saline soil engineering, HG or SG geopolymer dosages should be above 30% and 20%, respectively.