Substantial amounts of oily wastewater are inevitably generated during petroleum extraction and petrochemical production, and the effective treatment of these O/W emulsions is crucial for environmental protection and resource recovery. The development of an environmentally friendly, cost-effective, and efficient demulsifier that operates effectively at low concentrations remains a significant challenge. This study introduces an eco-friendly ionic liquid demulsifier, Cotton Cellulose-Dodecylamine (CCDA), which demonstrates exceptional demulsification performance at low concentrations. CCDA was synthesized from natural cotton, which underwent hydrophobic modification using dodecylamine. The chemical structure and surface morphology were characterized using FT-IR,