This paper discussed the potential application of extract from the peels of red-fleshed dragon fruit [Hylocereus costaricensis (F.A.C. Weber) Britton & Rose, 1909] to improve flame-resistant properties of cotton textile. The effects of peels extract treatment on flame-resistant properties of cotton textile were confirmed through standard flammability tests, limiting oxygen index (LOI), and thermogravimetric analysis (TGA), compared to those of untreated cotton textile. The changes in microscopic structure of treated cotton textile were observed through scanning electron microscopy (SEM) images, while the changes in chemical composition were determined through Fourier transform infrared (FT-IR) spectroscopy analysis and Energy dispersive X-ray fluorescence spectroscopy (EDX-FS) analysis. Experimental results showed that the treated cotton textile exhibited excellent flame-resistant properties, even after 30 cycles of standard washing. Therefore, the treatment with extract from the peels of red-fleshed dragon fruit had been demonstrated to hold great potential as a novel green approach for imparting flame-resistant properties to cotton textile.