In order to enhance the oil–water separation properties of polyurethane foam (PFU), hydrophobic silica nanoparticles (H‐SiO2 NPs) were firstly prepared by incorporating long alkyl chains into silica nanoparticles, and then, it was combined with PFU by in situ loading to fabricate a hydrophobic PFU (H‐SiO2 NPs/PUF). When the loading amount of H‐SiO2 NPs was 10%, the water contact angle of the modified foam H‐SiO2 NPs/PUF‐10 reached 147 ± 1°, which proved it was highly hydrophobic. The elongation at break of the foam was increased by 202%, which indicated that it had better resilience and recyclability. In addition, the total pore area and porosity were increased to 16.24 m2/g and 88.43% from 5.46 m2/g and 2.11%, which provided more storage space for adsorption. The oil–water separation experiment showed that the adsorption capacity for most light oils was 11–13 g/g, and that for dichloromethane was as high as 40.5 g/g. After 10 adsorption–desorption cycles, the adsorption capacity only decreased from 15.6 to 14.5 g/g, which was still 93% of the initial adsorption capacity. H‐SiO2 NPs/PUF represents good adsorption capacity, recyclability, and recyclability, so it as a carrier has a potential application in the treatment of marine oil spills.