Highly efficient and economic treatment of wastewater sludges and wastewaters in one way is a challenging issue in the water treatment field. Herein we present a waste-to-resource strategy for rational fabrication of low-cost ceramic membranes, which simultaneously addresses the treatment of heavy metal-laden sludges and the separation of oil-in-water (O/W) emulsions. A thermal conversion mechanism is proposed for complicated reactions between simulated nickel-laden wastewater sludge and bauxite mineral. In addition to full stabilization and recycling of heavy metal wastewater sludges, rational tailoring of ceramic membrane structures can also be realized to achieve high water flux, favorable mechanical and surface properties.With rational structure design, the tailored spinel-based ceramic membranes exhibited high rejection and high flux (7473 LMH•bar -1 ) simultaneously for separation of oily wastewater, outperforming other reported state-of-the-art ceramic membranes. The membrane fouling mechanism revealed the dominance of cake layer formation at low cross flow velocities, while a combined model of cake layer formation and pore blocking dominated membrane fouling at high cross-flow velocities. The proposed strategy can be potentially extended toward design of functional ceramic membranes derived from other heavy metal wastewater sludges and for other water treatment applications.