To meet the growing demands of multifunctional fabrics in different scenarios that require fire safety, developing flame-retardant coatings with integrated superhydrophobicity and antibacterial properties is imperative. However, how to simultaneously achieve all these features is still a big challenge. Here, a novel multifunctional coating containing polyethyleneimine (PEI), phytic acid (PA), iron ion (Fe3+) and dimethyloctadecyl [3-(trimethoxysilyl) propyl] ammonium chloride (QAS) is constructed by a facile dip-coating strategy. Attributed to the in-situ growth process of the phytic acid metal complex aggregations, the designable hierarchical micro/nano-scale protuberances can be generated. The resultant coating exhibits a good liquid repellency with water contact angles above 155°. Benefiting from the intumescent effect, the coating can produce a dense char layer, and hence to give the coated fabrics a self-extinguishing behavior in the vertical burning test with a limiting oxygen index value of ∼28.5%. Due to the presence of N+ and alkyl chain of QAS, the coating exhibits appreciable antibacterial activity and self-cleaning ability. Additionally, the multifunctional coating can endure more than 20 washing cycles and 100 abrasion cycles without losing its hydrophobicity, flame retardancy and antibacterial properties. The performance and function improvements mainly come from the well arrangements of phosphorus, nitrogen and metal elements. The multifaceted features enable promising applications of such coating in advanced functional textiles, protective clothing, transportation facility, etc.