Hypothesis. Major oil spills highlight the need for environmentally responsible and cost-effective recovery technologies. However, challenges remain for heavy oil spill recovery because of its high viscosity and low fluidity. To achieve this goal, an ecofriendly bio-based aerogel with efficient photothermal conversion ability was developed as a novel absorbent to achieve the fast removal of heavy oil spill by reducing the oil viscosity.Experiments. From the renewable and abundant raw material sodium alginate (SA), hydrophobic and antibacterial SA/graphene oxide/ZIF-8 aerogel (SAGZM) was successfully fabricated via freezing-drying and chemical vapor deposition (CVD) technique. A series of characterization and tests, including aerogel structure, selective wettability, photothermal conversion ability, crude oil removal capability, and antibacterial ability, have been investigated in detail. SAGZM aerogels have rich pore structure, high porosity, excellent mechanical properties, and better photothermal conversion efficiency.Findings. Under sunlight illumination, the recovery ability of SAGZM for heavy crude oil was investigated through infrared thermal imaging, oil permeability behavior analysis, and the continuous absorption for crude oil. In addition, these results are well supported by the theoretical liquid absorption coefficient. This study indicates that SAGZM is highly efficient in in situ regulating oil viscosity through its remarkably photothermal conversion capability. Importantly, SAGZM possesses an excellent antibacterial ability that is often neglected in the design of environmentally friendly materials in extending its service life. The findings of this work not only provide an eco-friendly bio-based aerogel material but also demonstrate that the photo-responsive SAGZM is efficient in heavy crude oil absorption. The proposed solar-heated SA-based aerogel provides a sustainable approach and material to solve the recovery problem of viscous crude oil spills.