Despite the diversity of energy sources at the present time, they have not been able to be a real alternative to crude oil, as it is still considered the primary source of energy in the world and will remain so for many years. As is known, the petroleum industry consists of an interconnected series of operations, starting with extracting crude oil from wells and ending with its refining process. As is known, the petroleum industry consists of an interconnected series of operations, starting with extracting crude oil from wells and ending with its refining process. These operations vary in degree of difficulty, cost, and challenges they face. Crude oil emulsion is one of the most costly issues in this important industry. In the current study, a novel environmentally friendly bio-demulsifier synthesized from corn oil waste has been introduced. The unique characteristics of this novel bio-demulsifier were diagnosed using several tests, including: Fourier transform infrared spectroscopy (FTIR), gas chromatography-tandem mass spectrometry (GC-MS), proton nuclear magnetic resonance (1HNMR), and thermogravimetric analysis (TGA). The demulsification activity has been evaluated using a bottle test method as a function of settling time, water content, and temperature. The maximum separation ratio was 69.3% at a dose of 1000 ppm for 5 hours and 70 °C, while the water-oil ratio was 30/70. The obtained results demonstrate that bio-demulsifier could be used as a safe and environmentally friendly alternative in initial demulsification units, which will reduce the environmental hazards and financial costs associated with the oil industry when using traditional demulsification methods.