AbstractIn recent years, the fabrication of hydrophobic materials and their excellent applications in oil spill cleanup has attracted widespread attention. Herein, we report the rapid and straightforward preparation of ZnCo2O4 nickel foam by hydrothermal synthesis. The prepared sample surfaces possess excellent superlipophilicity and superhydrophobicity after modification by stearic acid, so it can efficiently absorb light and heavy oil in water, and the absorption efficiency is over 99%. Besides, the unmodified ZnCo2O4 nickel foam could be subjected to effective oil–water separation at standard temperature and pressure, and its separation efficiency can be more than 97.4%. After 20 continuous filtration cycles, it can maintain stable high separation efficiency and even work under harsh environmental conditions, like acid, alkali, salt solution, high and low temperature, and ultraviolet radiation. Compared with other methods of manufacturing hydrophobic materials, this method is facile, lower cost, environmentally durable, and highly efficient. Therefore, the as‐prepared ZnCo2O4 nickel foam has good application value in treating oily wastewater.