Recently, biopolymers have emerged in soil stabilisation. The efficiency of biopolymers in ground improvement is mainly dependent on biopolymer types, soil types, biopolymer contents, curing periods, thermal treatment and mixing methods. However, the effect of the initial moisture content during sample preparation stages, on the mechanical behaviours of biopolymer-treated soils, has not been fully understood. The first part of this study probed the role of initial moisture content, in treating Shanghai clay with the xanthan gum by performing standard proctor compaction tests, Atterberg limit tests, unconfined compression strength (UCS) tests and microstructural analysis, while the second part contributed to capture the fatigue behaviours of the samples treated with an ideal moisture content by performing constant-amplitude and stepping-amplitude fatigue loading tests. Our results showed that the improvement appeared to occur from an average optimum moisture content for the treated soils (treated optimum), which was 3% wet of the untreated optimum. As the initial moisture content increased, the UCS values were elevated. However, there existed an ideal initial moisture content leading to the maximum strengthening efficiency. For xanthan gum content (i.e., the mass of xanthan gum with respect to the mass of dry soil) ranging from 1.0% to 5.0%, this ideal value was between 1.1 and 1.2 times the treated optimum. Our results also indicated that xanthan gum, as a biopolymer soil strengthener, was efficient in increasing either fatigue life or bearing capacity, under repeated loading for xanthan gum-soil matrices, when compared to untreated soils. While the untreated soils failed at the stress level of only half the UCS, the xanthan gum-treated soils with a 3.0% xanthan gum content sustained at the end of the tests. These data imply the potential use of xanthan gum in soil stabilisation, under repeated loads.