Direct conversion of biomass-derived aerogel to carbon aerogel (CA) via the pyrolysis method provides a promising approach to developing adsorbent materials for oil-spill cleaning. In this work, three-dimensional carbon aerogels (CSCA) were fabricated by pyrolyzing cellulose aerogels (Cell-A) synthesized from sugarcane bagasse (SB) and coffee grounds (CG) with sodium alginate (SA) as a cross-linker. Notably, the influence of CG to SA ratios on the characteristics and oil adsorption performance for used cooking and lubricating oil was investigated. The results showed that CSCA-1.5 with 1.5 wt% content of CG exhibited ultralow density (0.045 g/cm3), high porosity (96.28%), and an abundance of mesopores with an average pore size of 26.0 nm. In addition, the prepared CSCA-1.5 also had water resistance by illustrating a water contact angle of 101.6°, which enhances the selectivity for the removal of oils in water. Moreover, the oil adsorption results illustrated that CSCA-1.5 had an outstanding adsorption capacity for soybean and lubricating oil up to 10.023 and 5.804 mg/mg, with the oil adsorption behavior more aligned to the chemisorption process. Furthermore, the recyclability of CSCA-1.5 was also studied after five combustion/adsorption cycles, resulting in high remaining adsorption for the two oils mentioned above. With low-cost biomass as raw materials, a green preparation process, low density, and excellent hydrophobicity, CSCA has great potential in oil spill cleaning and environmental protection.Graphical abstract: