The discharge of crude petroleum oils and their derivatives poses serious environmental challenges, which can be mitigated through oil/water separation. In this study, polyurethane (PU)/polydopamine (PDA)/chitosan-graft (g)-octanal foam was prepared by immersing of PU foam in PDA and chitosan-g-octanal solutions. The fabricated PU foam exhibited thermal stability, flame retardancy, and hydrophobicity/superoleophilicity. The coated PU foam can selectively absorb heavy and light oils from dynamic and static oil/water mixtures. The maximum sorption capacity for olive oil was found to be as high as 41.48 g/g. PU/PDA/chitosan-g-octanal foam also demonstrated excellent flame retardancy and the ability to quickly extinguish fire, as confirmed by the limiting oxygen index (LOI) test.