In-situ generated metallic hydroxides from leaching solution of white mud. Approximately 95–99% of the emulsified oil was removed by IGMHs. IGMHs could be used for at least four cycles. Recovery of oil from oily wastewater could improve economic competitiveness.