Cellulose nanofiber (CNF) aerogels offer excellent thermal insulation properties, but high flammability restricts their application. In this study, CNF aerogels were prepared by incorporating sodium bicarbonate (SBC), which effectively improved the fire retardancy without compromising the thermal conductivity of the aerogels, which was only 28 mW m-1 K-1. The minimum burning velocity of flame-retardant aerogels was 0.20 cm s-1 at 40 wt % of SBC, which is significantly lower compared to 5.84 cm s-1 of pure CNF aerogels. At the threshold concentration of 20 wt % SBC, the flame-retardant aerogel demonstrated flameless pyrolysis along with enhanced char formation. SBC additionally provides control over the microporosity and morphology, due to the concentration-dependent formation of lamellar layers during the preparation of aerogels. Overall, this work describes an efficient method for preparing flame-retardant CNF aerogels that could lay the foundation for next-generation bio-based insulation materials.