In this study, CoFe2O4/Sawdust and NiFe2O4/Sawdust magnetic nanocomposites were synthesized using a hydrothermal method, and then characterized using X‐ray powder diffraction, Infrared, scanning electron microscopy, Brunauer–Emmett–Teller/Barrett–Joyner–Halenda, and vibrating‐sample magnetometer techniques. In this study, unmodified sawdust (US), modified sawdust (MS), unmodified CoFe2O4/sawdust (UCS), modified CoFe2O4/sawdust (MCS), unmodified NiFe2O4/sawdust (UNS), and modified NiFe2O4/Sawdust (MNS) magnetic nanocomposites, which are inexpensive, economical, environmentally friendly absorbents, and have a high selective hydrophobic, were used for the removal of oil from the water surface. The results show that the UCS, MCS, UNS, and MNS magnetic nanocomposites can selectively absorb the oil spreading on the water surface, due to its superhydrophobicity and superoleophilicity, and can be easily collected from water under the influence of a magnetic field. In addition, the results showed that the absorbents reach their equilibrium at the 30‐min mark. Among all the absorbents, the MNS magnetic nanocomposite showed the maximum absorption capacity (18.172 g/g) at the 40‐min mark. The results of the kinetic studies showed that the second‐order kinetic equation with the highest correlation coefficient had the best fit with the experimental results.