Facing the escalating issue of industrial wastewater discharge and its profound environmental repercussions, the creation of novel sponge materials that excel in oil-water separation while incorporating flame retardancy becomes critically urgent. Despite their superior absorption capabilities, conventional oil-water separation sponges typically overlook flame retardant features, a limitation that curtails their applicability. To address this gap, we have developed a multifunctional hydrophobic sponge through a sophisticated multi-step chemical self-assembly process. This method grafts 9,10-Dihydro-9-oxa-10-phosphaphenanthrene-10-oxide (DOPO) and perfluorinated compounds onto melamine foam (MF), yielding a composite material designated as DOPO-PF@MF. DOPO-PF@MF boasts a dual functionality of hydrophobicity and flame retardance. Its modified surface exhibits a pronounced hydrophobic-lipophilic balance, with a static water contact angle of 134°. It also displays favorable wetting characteristics towards various organic solvents, such as methanol, ethanol, dimethylformamide, dichloromethane, and hexane. This material demonstrates an impressive adsorption capacity for these solvents, with the adsorption-desorption capacity for ethanol remaining consistent over ten cycles. Furthermore, DOPO-PF@MF efficiently separates emulsions of methylene chloride and water, showcasing its versatility. Moreover, DOPO-PF@MF exhibits commendable chemical resilience under extreme temperatures, ranging from 0 °C to 100 °C, and withstands both acidic and alkaline conditions (pH 1–14), preserving its structural integrity against corrosive substances. Most notably, it surpasses unmodified melamine foam in flame retardancy. The incorporation of DOPO fortifies the material's resistance to high-temperature ignition, effectively inhibiting flame propagation and reducing burn rate, enhancing safety measures.