The highly efficient removal of oils such as oils or dyes from wastewater has aroused wide concern and is of great significance for clean production and environmental remediation. The synthesis of a novel aerogel (designated as HEC/LS) is reported herein, achieved through a sol-gel method followed by freeze-drying utilizing loofa and hydroxyethyl cellulose as the raw materials. The new HEC/LS aerogel exhibits excellent porosity and specific surface area, with a porosity of 88.70 %, a total pore area of 0.607 m2 g−1, and a specific surface area of 230 m2 g−1. The prepared HEC/LS aerogel exhibits exceptional hydrophilicity and self-floatability, facilitating its rapid absorption of water up to 21 times its own weight within a mere 3 s. Additionally, it demonstrates good adsorption performance for methylene blue (MB), with a maximum adsorption capacity of 83.30 mg g−1. Subsequently, a new hydrophobic microorganisms-loaded composite aerogel (namely, Bn-HEC/LS) was obtained by doping microorganisms into the as-prepared HEC/LS in multiple enrichment followed by a hydrophobic and oleophilic surface modification. Based on its rich porous structure and oleophilic wettability, the as-synthesized Bn-HEC/LS exhibits excellent selective adsorption and degradation properties for the oil contamination, the diesel oil could be selectively absorbed in the Bn-HEC/LS and degraded by the loaded microorganisms. Among them, B5-HEC/LS displays the highest removal efficiency of 94.50 % within 180 h, while free microorganisms and HEC/LS aerogels show degradation efficiencies of only 21.70 % and 48.10 %, respectively. The fixation of microorganisms in the aerogel increases their number within the material and enhances the relative microorganisms removal capacity. The hydrophobic and lipophilic modifications improve the selective adsorption performance of the aerogel on diesel oil, resulting in a significantly high removal rate of Bn-HEC/LS for diesel oil. The results indicate that the immobilization of microorganisms into aerogel improves the activity of microorganisms, and the hydrophobic and oleophilic modification enhances the selective adsorption performance of aerogel to diesel oil, thus resulting in a very high removal rate of Bn-HEC/LS for diesel oil. This study is expected to provide a now possibility for the green and efficient bioremediation of oils.