In this work, TiO2 was incorporated into the surface of cotton fabrics by an in situ sol–gel/hydrothermal approach. Dimethyloctadecyl [3-(trimethoxysilyl) propyl] ammonium chloride (SiQAC) was added as a bio-barrier Si precursor to enhance the synergistic effect/binding of TiO2 to the surface of cotton fabric. A small amount of silver nitrate (AgNO3) was added to produce Ag-doped TiO2-coated fabric during hydrothermal treatment. The treated cotton fabric samples were characterized by scanning electron microscopy (SEM), energy dispersive X-ray analysis (EDS), Fourier transform infrared spectroscopy (FT-IR) and X-ray diffraction spectroscopy (XRD) to determine the surface morphology, chemical composition, chemical bonding and crystal structure, respectively. These results confirmed the successful application of well-dispersed TiO2, Ag and SiQAC on the surface of cotton fabric. The cotton fabric functionalized with TiO2 + SiQAC + Ag nanocomposite exhibited superior antibacterial activity against Escherichia coli and Staphylococcus aureus, very good UV protection and excellent self-cleaning performance, which were maintained even after repeated washings. The wash resistance of the newly developed TiO2-based hybrid nanocoating was attributed to the formation of the SiQAC polysiloxane matrix, which served as an anchoring site for the Ag-doped TiO2 through the formation of Si–O–Ti bonds. The enhanced photocatalytic activity of TiO2 in the coating was attributed to the formation of the Ag/AgCl/TiO2 heterostructure, which is promising for the surface and interface engineering of TiO2-modified fabric.