Underwater superoleophobic (UWSO) materials have garnered significant attention in separating oil/water mixtures. But, the majority of these materials are made from non-degradable and non-renewable raw materials, polluting the environment and wasting scarce resources while using them. Against this backdrop, this study aimed to fabricate an environmental-friendly UWSO textile using biobased materials. To achieve this, hydrogel consisting of chitosan (CS) and poly(tannic acid) (PTA) were formed and coated on cotton fabric (CTF) via dip-coating followed by oxidative polymerization. CS&PTA hydrogel endowed the CTF with a rough surface and high surface energy, leading to an UWSO CTF with an underwater oil contact angle as high as 166.84°. The CS&PTA/CTF had excellent separation capability toward various oil/water mixtures, showing separation efficiency above 99.84 % and water flux higher than 23, 999 L m−2 h−1. Moreover, CS&PTA/CTF possessed excellent mechanical and environmental stability with underwater superoleophobicity unchanged after sandpaper friction, ultrasonication, organic solvents, NaCl (m/v, 30 %) solution, and acid/base solution immersion, due to the strong interaction between the hydrogel and cotton fabric generated by the mussel-inspired adhesion owing to the presence of PTA. The fully biobased UWSO CTF exhibits great promising to be an alternative to traditional superwetting materials for separation of oil/water mixtures.