Cotton fabric is a textile material that is valued for its strength, breathability, absorbency, and potential for many textile products. In this study, titanium dioxide (TiO2) was synthesized by the sol-gel method, and cotton fabric was coated with TiO2 by the dip-coating method in an ultrasonic bath for self-cleaning applications. The characteristics of the coated cotton fabric were determined by scanning electron microscopy, X-ray diffraction, energy dispersive X-ray, and tensile strength. The photocatalytic activity of cotton fabric treated with TiO2 nanoparticles was followed by the degradation of three organic compounds, such as tea, coffee, and red wine, under solar, UV, and xenon light conditions. The results showed that stains of organic compounds were successfully decomposed by more than 50%, and the light conditions significantly affected the self-cleaning ability of fabric. The higher energy of light leads to improved degradation of stains on the treated fabric. With the ability to self-clean, cotton fabric may have great potential for commercialization in the textile industry for high-end products.