Introduction

As a natural material, cotton fabrics have excellent properties compared to various chemical fabrics, such as hydrophilicity, biocompatibility, and degradability (Laufer et al. 2011). With the development of finishing processes, cotton fabrics not only can be made into underwear products that are in contact with the skin, but also can be used in various decorative and outdoor products (Abou-Okeil et al. 2013; He et al. 2019; Liu et al. 2017; Nguyen et al. 2012). Due to the comfort and environmental protection of natural fiber fabrics, the market share of natural textiles is gradually rising. The fly in the ointment is that the extremely flammable properties of cotton fabrics bring hidden dangers to consumers' lives and property, which greatly limits its application in more fields (Salmeia et al. 2016), thus enduing the cotton fabrics excellent flame retardancy becomes important research work.

In the past few decades, researchers have developed many flame retardants for cotton fabrics (Nazir and Gaan 2019; Salmeia et al. 2016). Among them, one of the earliest research contents is to prepare a flame retardant using a halogen-based, which have excellent flame retardant effects regardless of whether they are used for cotton fabrics or other materials (Richard Horrocks 2013). However, halogen-based flame retardants have gradually entered the edge of industrial elimination due to corrosive fumes and harmful substances during the thermal degradation process (van der Veen and de Boer 2012; Yuan et al. 2012). Subsequently, the appearance of organic compounds containing phosphorus and nitrogen element became the main development direction of flame retardant for cotton fabrics (Edwards et al. 2014; Gaan et al. 2008). The flame retardant mechanism mainly consists of condensed phase and gas phase. The nitrogen element can generate a low-density non-combustible gas during combustion, cover to the fiber surface and insulate the fiber from the external flammable gas to achieve flame retardant. phosphorus element can be converted into polyphosphoric acid compounds and esterification and cross-linking reaction with the fiber macromolecular during fabrics combustion, thereby promoting the formation of the carbon layer (Alongi et al. 2011; Jia et al. 2016; Jiang et al. 2015; Zhao et al. 2020; Zhou et al. 2014b).

Lately, triazine-based phosphorus-nitrogen synergistic flame retardants have attracted widespread attention because they contain reactive groups similar to reactive dyes (Zhao et al. 2014). When the fabrics are treated with this type of flame retardant and reactive dye in the same finishing bath, both the bright color and the excellent flame retardancy of the cotton fabrics can be simultaneously imparted, which extremely reduces the waste of energy and materials in the finishing process. Because of such obvious advantages, it is necessary to make further exploration to promote the rapid development of triazine-based cotton flame retardants (Li et al. 2015).

In this study, a phosphor-nitrogen synergistic effect flame retardant with reactive groups, CTSGP was synthesized and connected with the cotton fabrics by covalent bonds. The chemical structure of CTSGP and treated cotton fabrics were analyzed by FT-IR. The flame retardant property of CTSGP-treated fabrics was investigated by vertical flammability test and LOI test. The thermal degradation process and combustion behaviors of samples were characterized by TG analysis and cone calorimetry, respectively. The surface morphology and elemental composition were studied by SEM and EDS, respectively. Most importantly, the dyeing behavior of the mixture of CTSGP and reactive dyes was also explored by using the same finishing bath to treat cotton fabrics.

Experimental

Materials

Scoured and bleached plain-woven cotton fabrics (14.75 tex × 14.75 tex, 122 g/m2) were obtained from Weifang Qirong Textiles Co., Ltd (China). Sodium sulfanilate was supplied by Jinan Woerde Co., Ltd (China). Cyanuric chloride (C3H2Cl3N3) was obtained from Xiya Reagent Co., Ltd (China). Dimethyl hydroxymethyl phosphonate was provided by Shandong Jiayi Chemical industry Co., Ltd (China). Acetone, sodium carbonate, and sodium chloride were purchased from Tianji Ruijinte Chemical reagent Co., Ltd (China). Reactive red K was obtained from Shanghai Pudong Dyeing Co., Ltd (China).

Synthesis of CTSGP

The sodium 4-((4,6-dichloro-1,3,5-triazin-2-yl)amino)benzenesulfonate (CTSG) was synthesized by reacting cyanuric chloride with sodium sulfanilate according to the reported literature (Kim et al. 2004). Briefly, the cyanuric chloride (5.53 g, 0.03 mol) was dispersed in acetone (80 mL, as solvent), the mixture was then added to a three-necked flask charged with a thermometer, a mechanical stirring mixer, and a constant pressure funnel. The temperature of the system was controlled at 0–5 °C by ice-water bath, the sodium sulfanilate (5.86 g, 0.03 mol) was added and the reaction was stirring for 2 h. 20% sodium carbonate solution was added to the flask drop by drop through a constant pressure funnel to neutralize the generated hydrochloric acid during the reaction process. After the reaction, the solution and unreacted materials were removed by vacuum filtration, and the white deposit was washed with excessive acetone. The white solid CTSG was obtained by drying at 30 °C in a vacuum oven for 4 h.

A mixture of CTSG (10.27 g, 0.03 mol) and H2O (100 g) was stirred in a three-neck flask until the solid dissolved, during which the system temperature was maintained at 25 °C. The system was then warmed slowly to 55 °C. Subsequently, dimethyl hydroxymethyl phosphonate (4.20 g, 0.03 mol) was dispersed in H2O (20 ml) and added dropwise to the flask. The pH value of the reaction mixture was maintained at 7–8 with 20% sodium carbonate aqueous solution. The temperature of the mixture was kept constant at 55 °C. After 5 h, the final product CTSGP was obtained by evaporation under reduced pressure. The synthesis reactions of the CTSG and CTSGP were shown in Scheme 1.

Scheme 1
scheme 1

The synthesis process of CTSG and CTSGP

Flame retardant finish of cotton fabrics

The cotton fabrics were soaked in a finishing bath containing distilled water (the bath ratio was 1:25), CTSGP (220 g/L) (Scheme 2). The mixture was kept at 60 °C in a thermostatic bath for 15 min, then NaCl (40 g/L) was added and the mixture was continuously stirred at this temperature. After 15 min, gradually raise the temperature of the system to 90 °C. Subsequently, Na2CO3 (10 g/L) was added into the finishing bath and treated for 60 min. Finally, the treated cotton fabrics were washed with water and dried thoroughly.

Scheme 2
scheme 2

The reaction process between CTSGP and cotton fabrics

The cotton fabrics were weighed before and after treatment and the data was fitted to equation to obtain add-on percentage:

$${\text{Weight}}\;{\text{gain }}(\%) = \frac{{W_{f} - W_{b} }}{{W_{b} }} \times 100\%$$

Wb and Wf represent the mass of cotton fabrics before and after flame-retardant treatment, respectively.

Finishing cotton fabrics with dye and flame retardant in the same bath

The cotton fabrics were immersed in a finishing bath containing various amounts of deionized water, reactive red K and CTSGP (220 g/L) with a bath ratio of 1:30 at 60 °C for 15 min, then NaCl was added and continue stirring for 15 min. Subsequently, raise the finishing bath temperature to 90 °C gradually, and Na2CO3 was added to the finishing bath, keep stirring at the same temperature for 60 min. Finally, the treated cotton fabrics were washed with water and dried thoroughly.

Measurements and characterizations

The limiting oxygen index (LOI) test of samples was conducted using a LFY-606B digital limiting oxygen index tester (Shandong Textile Science Research Institute, China) according to GB/T 5454-1997. The vertical flammability test of samples was carried out using a LFY-601A apparatus (Shandong Textile Science Research Institute, China) according to GB/T 5455-2014.

The combustion behaviors of untreated and treated cotton fabrics were conducted by cone calorimetry (Fire Testing Technology, UK). The determination of the degree of fixation according to GB/T 2391-2014.

Thermogravimetric (TG) analysis of control and treated cotton fabrics was performed using a HTG-1 thermal (Beijing Hengjiu Instrument Factory, China) in the temperature range of 35–700 °C at a heating rate of 10 °C/min and a gas flow rate of 50 ml/min under both air and nitrogen atmospheres.

Fourier transform infrared spectroscopy (FT-IR) analysis of CTSGP and char residues which are burning in air of untreated and treated cotton fabrics were acquired using a Nicolet iS 50 FT-IR spectrometer (Thermo Fisher Scientific, Waltham, MA, USA) over the wavenumber range of 500–4000 cm−1 using the ATR method.

The surface morphology of the residues of untreated and treated cotton fabrics before and after combustion was investigated by JSM-6010LA SEM apparatus (Japan Electron Optics Laboratory Co. Ltd, Tokyo, Japan). Samples were coated with conductive gold by a sputter coater for analysis purposes.

The contents of phosphorus (P), oxygen (O), carbon (C) and nitrogen (N) on the surface of the CTSGP-treated cotton fabrics before and after combustion were assessed with JEOL-6300F energy dispersive spectrometer (EDS).

The color fastness to dry and wet rubbing of flame-retardant/dyed cotton fabrics were tested by Y571 dying rubbing fastness tester (Laizhou Yuanmao Instrument Co. Ltd, China) according to GB/T 3920-2008. In addition, the softness of flame retardant/dyed cotton fabrics was tested by YM-01c electronic stiffness tester (Laizhou Yuanmao Instrument Co. Ltd, China) according to GB/T18318.1-2009.

Results and discussion

Chemical structure of CTSG and CTSGP

The structures of sodium sulfanilate, dimethyl hydroxymethylphosphonate, CTSG and CTSGP were confirmed by FT-IR spectrum. The infrared spectrograms were shown in Fig. 1. In the spectrum of sodium sulfanilate, the peaks at 3437 and 3225 cm−1 was attributed to -NH2 group, while in the spectrum of CTSG and CTSGP, a new peak was generated at 3398 cm−1, which is caused by the stretching vibration of –NH– group, indicating that a new chemical bond was formed by the reaction of cyanuric chloride with sodium sulfonate (Lin et al. 2019). The characteristic peaks at 1183 and 1031 cm−1 can be observed on the spectra of dimethyl hydroxymethylphosphonate and CTSGP, which belong to P=O bond and P–O–C bond respectively, indicated that dimethyl hydroxymethylphosphonate was grafted successfully on the intermediate CTSG (Nguyen et al. 2013; Jiang et al. 2019). Additionally, the absorption peak at 730 cm−1 in the spectrum of CTSG and CTSGP was attributed to the stretching vibration of C–Cl bond on the triazine ring (Sun et al. 2020). All these absorption peaks indicated that the flame retardant CTSGP was successfully obtained.

Fig. 1
figure 1

The FT-IR spectrum of sodium sulfanilate, dimethyl hydroxymethylphosphonate, CTSG and CTSGP

Flame retardant performance

The flame retardance of CTSGP-treated fabrics was further explored by the LOI test and vertical burning test. From Table 1, it can be seen that CTSGP increased the LOI value of cotton fabrics from 18.0 to 29.0%, reaching the standard of self-extinguishing (Liu et al. 2018b). The vertical flammability test results displayed that the control sample was destroyed completely, while the flame of treated fabrics soon went off and only 62 mm of char was produced. Besides, the after-flame time and after-glow time of the treated cotton fabrics were 0 s. The results show that CTSGP has obvious flame retardancy and can prevent cotton fabrics from being completely destroyed in combustion.

Table 1 Flammability of untreated and CTSGP-treated cotton fabrics

Thermal degradation behaviors

The thermal-oxidation and thermal degradation processes of samples were explored by TGA test in air and nitrogen atmosphere, respectively. The line graphs for TG and DTG of samples are shown in Fig. 2 and the related data are listed in Table 2. As shown in Fig. 2a, b, the degradation of untreated fabrics in air atmosphere has two stages of mass loss. In the first stage, the untreated fabrics start to dehydrate at 268 °C (Tonset: the initial decomposing temperature) and reached the maximum rate degradation temperature (Tmax) at 346 °C, almost 62.3% carbon layer could be retained at Tmax, the mass loss in this stage was mainly due to volatile substances produced by cellulose degradation. At 700 °C, the char residue was 1.6% of the original weight. Compared with untreated fabrics, CTSGP-treated samples had significantly lower Tonset (240 °C) and Tmax (309 °C), almost 77.6% and 27.9% of char residues could be retained at Tmax and 700 °C, respectively. It can be seen that the weight loss of fabric was obviously reduced, the thermal oxidative stability and char-forming ability of the treated fabrics achieve a significant improvement. These significant improvements might be attributed to the phosphorus-containing component in CTSGP will be converted into metaphosphoric acid, polymetaphosphoric acid (Osman et al. 2017). The polyphosphoric acid compounds were a kind of strong dehydration catalyst, which can dehydrate and carbonize the fabric and form a stable char layer (Wang et al. 2018). In conclusion, the CTSGP-treated fabrics showed better thermal oxidation stability and flame retardancy than pure cotton fabrics.

Fig. 2
figure 2

TGA and DTG curves of untreated and CTSGP-treated cotton fabrics in the air (a, b) and nitrogen (c, d)

Table 2 Thermogravimetric (TG) data of untreated and CTSGP-treated cotton fabrics in air and nitrogen

In nitrogen atmosphere, the resulting curves were shown in Fig. 2c, d. The weight of CTSGP-treated cotton rapidly decreased at the temperature range from 270 to 350 °C and the Tmax was generated at 317 °C, which is lower than that of untreated fabrics (361 °C). The char residue was 42.6% of the original weight at 700 °C, and much higher than untreated cotton fabrics, which is only 10.8%. Therefore, it is further proved that cotton fabrics treated with flame retardant have better thermal stability.

Surface morphology

To further explore the flame retardant mechanism of CTSGP, SEM was used to observe the surface morphology of untreated cotton fabrics, CTSGP-treated fabrics before and after burning, the results were shown in Fig. 3. From Fig. 3a1, a2, it can be seen that the cotton fabrics have a smooth original surface morphology, whereas that after being treated with CTSGP, the cotton fabrics retain basically their original structure and shape and the diameter of fibers seems to be larger, the surface was coated by a layer of fine flocculent substance. This difference indicates that flame retardants have been successfully applied to cotton fabrics. It can be seen from the picture (shown in Fig. 3c1, c2) that the burning char residues of finishing cotton fabrics can basically keep the original fabric structure, and the carbon layer has good continuity and integrity. The surface of the fabrics after combustion formed a lot of bubble-like protrusions, which coated on the surface of the fiber. There are two possible reasons for its formation: on the one hand, the polyphosphoric acid compounds promote the formation of char layer; on the other hand, the nitrogen-containing components release non-combustible gas and expand the fibers to form bubbles, diluting combustibles and hindering the spread of the flame (Zhang et al. 2018). The results are consistent with TG. These proved that the CTSGP is conducive to the char formation of cotton fabrics and certified the CTSGP have an effective promotion for flame retardant of cotton.

Fig. 3
figure 3

SEM of untreated cotton fabrics (a1, a2), CTSGP-treated cotton fabrics (b1, b2), CTSGP-treated cotton fabrics after combustion (c1, c2)

Elemental composition

EDS test was carried out on the samples before and after combustion, and the results were shown in Fig. 4. Compare Fig. 4a, c, the element ratio of samples before and after combustion changed dramatically, and the proportion of C element increased significantly, from 56.87 to 81.17%, indicating that the fibers were adequately carbonized during combustion. The proportion of P in the sample also increased after combustion, because the flame retardant was decomposed by heat to form phosphoric acid derivatives, which attached to the surface of the fiber and improved the char-forming ability of the fabrics (Dong et al. 2019). The mass concentration of N decreased from 2.18% before combustion to 0.18% after combustion, and the apparent concentration decreased to 0, which may be related to the gas-phase flame retardant mechanism of nitrogen. From the above, the N and P elements in CTSGP play an important role in flame retardant of cotton fabrics. As shown in Fig. 4b, d, these elements were homogeneously distributed on the surface of the fabrics, with dense distribution of C and O elements and sparse distribution of P and N elements. Compared with that before combustion, the nitrogen was almost invisible in the fabrics after combustion, while phosphorus remained on the fabrics. This may be since N elements were released into the air during combustion as a non-flammable gas, while P elements were retained on the surface as a protective layer of phosphate derivatives (Dong et al. 2015, 2014). In conclusion, the flame retardant mechanism analysis of CTSGP is consistent with that of TG.

Fig. 4
figure 4

Elemental composition of treated cotton fabrics with CTSGP before (a) and after combustion (c), EDS mapping of treated cotton fabrics with CTSGP before (b), and after combustion (d) (C, N, O, and P refer carbon, nitrogen, oxygen, and phosphorus, respectively)

FT-IR analysis of the char residues

To confirm the chemical structure and group changes of the samples after combustion, the FT-IR of the residues of cotton fabrics tested by vertical flammability is shown in Fig. 5. Although there were so many similarities between them but the treated cotton fabrics showed some special characteristic peaks. In the spectrum corresponding to the treated samples, the characteristic peak at 1226 cm−1 was assigned to P=O stretching vibration, which belongs to pyrophosphate, indicating that organophosphorus compounds were formed in the combustion of treated samples; because of the coupling of the P–O bond and the C–O bond, the peak around 1028 cm−1 was assigned to the P–O–C stretching vibration, but there was almost no peak of the nitrogen-containing compound (Liu et al. 2020). Combined with EDS and SEM analysis showed that the treated cotton fabrics released non-combustible gas (nitrogen-containing gas) during combustion led to the absence of peaks of nitrogen-containing groups, which consistent with the cause of bubbles on the char residues surface (Tian et al. 2019). It was shown that a protective layer of phosphorus was formed to isolate the air and a part of the heat, which reduced the contact between the fiber and the fire source (Zheng et al. 2016). These results convincingly indicate that CTSGP is an efficient intumescent flame retardant for cotton fabrics.

Fig. 5
figure 5

FT-IR spectra of residues of untreated and treated cotton fabrics after burning in air

Combustion behaviors

The combustion behaviors of untreated and CTSGP-treated cotton fabrics were evaluated by the cone calorimeter test. The results were plotted in Fig. 6 and pivotal corresponding data was collected in Table 3. The heat release rate (HRR) value and total heat release (THR) value of treated samples are much smaller than that of untreated fabrics (shown in Fig. 6a, b). Moreover, it can be seen from Fig. 6c that the effective heat of combustion (EHC) value of treated fabrics was lower than that of untreated fabrics. This means that the heat released per unit mass of cotton fabrics is significantly reduced after the CTSGP treatment. Besides, it is worth noting that the mass loss after combustion of untreated fabrics was as high as 95.52%, while that of treated fabrics was only 74.70% (shown in Fig. 6d and Table 3). This may be due to phosphoric acid compounds from the decomposition of flame retardants, which promotes carbon formation (Huang et al. 2019). According to Table 3, the peak heat release rate (PHRR) of the fabrics treated by CTSGP was maintained at 11.64 kW/m2, which decreased by 92% compared to that of the untreated cotton fabrics (144.23 kW/m2). Compared with untreated fabrics, the time of peak heat release rate (TPHRR) of treated fabrics was greatly delayed. After treatment, the fire growth rate (FGR, the ratio between PHRR and TPHRR) of the fabrics decreased significantly, which meant that the fire safety of the material was dramatically improved (Liu et al. 2018a). Obviously, the flame retardancy of samples treated with CTSGP is greatly improved. In addition, the CO and CO2 produced by the combustion of the treated sample also decreased significantly, and the CO2/CO ratio, an important parameter of combustion efficiency, decreased from 23.30 to 6.79, which indicates that the combustion efficiency of the sample has decreased dramatically. This phenomenon may be caused by the scavenging of free radicals (·OH and ·H) by non-flammable gases generated by the pyrolysis of CTSGP, which limited the spread of the flame and prevents further oxidation of the combustible gas (Zhang et al. 2019). All of the indicates demonstrate that the flame retardant property of fabrics was improved obviously.

Fig. 6
figure 6

Heat release rate (HRR) (a), total heat release (THR) (b), effective heat of combustion (EHC) (c), and residue (d) curves of untreated and treated cotton fabrics

Table 3 Cone calorimeter data of untreated and treated fabrics

Washing durability

The LOI values of CTSGP-treated fabrics after washing are shown in Table 4. The results show that the LOI values of the samples decreased gradually with the increase of washing times. After 25 washing cycles, the LOI value dropped from 28.8% to 26.2%, still meeting the requirements of flame retardancy standard of cotton fabric, indicating that the cotton fabrics treated by CTSGP have good washing resistance (Zhou et al. 2014a). These results were likely due to the flame retardant CTSGP was bonded with the cotton fabrics by covalent bond, and the intermolecular hydrogen bond therein also improved the wash fastness of the treated samples (Lu et al. 2019; Zhou et al. 2020).

Table 4 The LOI value of treated cotton fabrics with CTSGP after different laundering cycles

One-bath treatment of flame retardant and reactive dye

In order to explore the mixed dyeing behavior of CTSGP and reactive dyes, the flame retardant CTSGP and reactive red dye were treated for cotton fabrics in the same bath. The results are shown in Table 5, the schematic diagram of CTSGP and reactive red K dyeing fabrics in the same bath and the effect diagrams are shown in Fig. 7. The concentration of CTSGP will affect the dyeing results and flame retardant properties of samples. With the increase of the amount of CTSGP, the dye uptake, and the fixation of treated fabrics decrease gradually, because there is a competitive relationship between CTSGP and reactive dyes in the process of finishing fabrics, CTSGP and the reactive dye K both contain reactive groups those can form the covalent bond with the fibers. When the amount of CTSGP reaches 200 g/L, the LOI value of the fabrics dyed by the same bath can still reach 26.2%, and the fabrics finished with the bath by reactive dye and different concentrations of CTSGP show a little color difference.

Table 5 Effect of different content of CTSGP on cotton fabrics dyeing
Fig. 7
figure 7

Schematic diagram of CTSGP and reactive red K dyeing fabrics in the same bath

The flame retardant CTSGP has the same active group as monochlorotriazine reactive dyes. In active red K and flame retardant CTSGP mixed dye bath, under alkaline conditions, the hydroxyl groups on cellulose are ionized to produce cellulose hydroxyl negative ion Cell-O, which are nucleophilic. monochloro-homotriazine group is electrophilic, so Cell-O- attacks carbon atoms in the lower electron cloud density of the triazine ring (Khatri et al. 2015). Due to the strong electronegativity of chlorine element, the electron cloud density of the carbon atoms connected with it is low, which makes it vulnerable to the attack of the nucleophile and leads to nucleophilic addition reaction. Subsequently, the chloride ion leaves the unstable addition product to obtain the stable nucleophilic substitution product (Siddiqua et al. 2017). Since the hydroxyl group on the cellulose is limited and can only react with a certain amount of active groups, the reactive red K has a competitive relationship with the flame retardant CTSGP (Chang et al. 2011; Lee and Jang 2020).

Triazinyl compounds exhibit good carbonization properties when applied to textile materials and are usually used as carbonizing agents for intumescent flame retardants (Xu et al. 2013). Triazine possesses abundant tertiary nitrogen atom, nitrogen element can generate low-density non-combustible gases during combustion, which can reduce the surface temperature of the fabrics and isolates oxygen and flammable gases, making it difficult to continue burning (Liu et al. 2020). Phosphorous compounds also have good flame retardant properties. Phosphorous can be converted into phosphoric acid and polyphosphoric acid in the condensation phase, and the esterification cross-linking reaction occurs with the cellulose to promote the carbonization of fibrous materials. Meanwhile, the char layer can prevent the further pyrolysis of the Cellulose material, on the other hand, it can prevent the thermal decomposition products from entering the gas phase to participate in the combustion process (Duquesne et al. 2004). The P/N synergistic effect can improve the thermal stability of the flame retardant and show a better flame retardant properties.

Softness and color fastness to rubbing of flame-retardant/dyed cotton fabrics

The softness, color fastness to dry rubbing and wet rubbing of cotton fabrics treated with 200 g/L CTSGP and reactive dyes were tested. The test results are shown in Table 6. Bending length refers to the length when the suspended end of the rectangular fabrics sample is bent to a specified angle under the action of dead weight. The smaller the bending length, the better the softness of the fabrics. It can be seen from the data in Table 6 that the bending lengths of flame retardant/dyed cotton fabrics are less than that of the untreated cotton fabrics, whether in the warp or weft direction, which means that the softness of cotton fabrics is slightly improved after flame retardant/dye treatment. For the color fastness to dry rubbing, there is almost no color difference between the rubbed part and the unrubbed part of the cotton rubbing cloth, reaching fastness rating 5, regardless of warp or weft direction. The rubbed part of the wet cotton rubbing cloth appeared light pink, color fastness to wet rubbing reaches 4. The results show that the flame-retardant dyed fabrics have ideal color fastness to rubbing, the main reason may be that the dye and the fabrics are connected by covalent bonds, which are difficult to break by simple friction.

Table 6 The color fastness to rubbing and bending length of flame retardant/dyed fabrics and untreated fabrics

Conclusions

A new type of triazine P/N synergistic effect flame retardant (CTSGP) which can be treated with reactive dyes in the same bath was synthesized and characterized by FT-IR. The cotton fabrics treated by CTSGP showed excellent flame retardant properties, in which the char length was 62 mm of vertical burning test and the LOI value reached 29% with 21.4% of weight gain. The results of thermogravimetric analysis showed that the char residues of CTSGP-treated fabrics increased greatly at 700 °C in nitrogen, from 10.8% to 42.6%. From the combustion behavior, the HRR and THR values of treated samples were smaller and the ratio of CO2/CO was significantly reduced, contrast with the control sample. Comprehensive SEM, EDS, and FT-IR analysis confirmed that the CTSGP-treated fabrics produced non-combustible gases and formed an organic phosphorus layer on the fiber surface during the combustion process. When the flame retardant CTSGP and reactive red dyes were treated in the same finishing bath, cotton fabrics not only can be given bright colors but also excellent flame retardancy. Moreover, flame retardant/dyed fabrics have ideal rubbing fastness and Softness. In summary, CTSGP can improve the thermal stability and flame retardant of cotton fabrics.