Cellulose aerogels with low density, high mechanical strength, and low thermal conductivity are promising candidates for environmentally friendly heat insulating materials. The application of cellulose aerogels as heat insulators in building and domestic appliances, however, is hampered by their highly flammable characteristics. In this work, flame retardant cellulose aerogels were fabricated from waste cotton fabrics by in situ synthesis of magnesium hydroxide nanoparticles (MH NPs) in cellulose gel nanostructures, followed by freeze-drying. Our results demonstrated that the three-dimensionally nanoporous cellulose gel prepared from the NaOH/urea solution could serve as scaffold/template for the nonagglomerated growth of MH NPs. The prepared hybridized cellulose aerogels showed excellent flame retardancy, which could extinguish within 40 s. Meanwhile, the thermal conductivity of the composite aerogel increased moderately from 0.056 to 0.081 W m(-1) k(-1) as the specific surface area decreased slightly from 38.8 to 37.6 cm(2) g(-1), which indicated that the excellent heat insulating performance of cellulose aerogel was maintained. Because the concepts of the process are simple and biomass wastes are sustainable and readily available at low cost, the present approach is suitable for industrial scale production and has great potential in the future of green building materials.