A flame-retardant and hydrophobic coating was deposited on the surface of the cotton fabric via a two-step spray deposition technique. Specifically, the coating was composed of flame-retardant component (guanidine phosphate) and hydrophobic components (Ti-MOF and bis(3-aminopropyl)-terminated poly(dimethylsiloxane) (PDMS)) and crosslinked with glutaraldehyde. The limiting oxygen index (LOI) of the coated cotton fabrics increased from 18.0% to 32.0% (15#) and 26.5 % (15#-Ti-PDMS) relative to that of the original cotton fabric, and the coated cotton fabrics also self-extinguished in the UL-94 flammability test. Compared with that of the original cotton fabric, the PHRR of the coated fabrics was significantly lower, reaching 80 %. The coated cotton fabrics (15# and 15#-Ti-PDMS) had good antibacterial properties against Staphylococcus aureus (S. aureus). In addition, 15#-Ti-PDMS had high hydrophobicity, good washing and abrasion resistance and good water-oil separation performance. Its water contact angle was 146 degrees. The water contact angle remained above 130 degrees after 10 laundering cycles and 50 scratch cycles. Even under strongly acidic and strongly basic conditions, the wateroil separation efficiency of 15#-Ti-PDMS was greater than 99%, and it was still greater than 90% after 10 cycles. Therefore, a simple and effective method for preparing flame-retardant, hydrophobic and antibacterial cotton fabric was developed.