Sustainable and robust superhydrophobic cotton fabrics were fabricated using a coating solution that consisted of a novel castor oil-based thiolated oligomer (CO–SH), octavinyl polyhedron oligomeric sesquiloxane (Octavinyl-POSS), and hydrophobic SiO2 (H–SiO2) nanoparticles, via spray deposition and UV-induced thiol-ene click chemistry. The novel CO–SH was synthesized through the thiol-ene click reaction of castor oil and 3-mercaptopropionic acid, following the esterification reaction with 2-mercaptoethanol. The wettability of the coated cotton fabrics was tunable by changing the concentration of H–SiO2 nanoparticles to ultimately obtain superhydrophobic coatings with self-cleaning properties. The highly robust superhydrophobic cotton fabric could resist at least 30 sandpaper abrasion cycles and 60 min ultrasound treatment without the loss of its superhydrophobicity. Meanwhile, the functional cotton fabric was capable of separating a variety of oil–water mixtures and emulsions with ultrahigh separation efficiency due to the excellent superhydrophobicity and superoleophilicity. The separation efficiency was maintained at a value above 99.990% even after 30 separation cycles. Therefore, the superhydrophobic fabric fabricated in this work can be practically employed as a highly efficient separation material in the management of oily water, which is to the benefit of the environment and human health.