The effect of carboxylated cellulose nanofiber (CCNF) on the firefighting foam stability and stabilization mechanism is investigated. The results show that equilibrium surface tension of CTAB/FC1157 solution decreases when CCNF concentration increases to 0.5 wt%, while CCNF has little effect on that of SDS/FC1157 solution. Besides, when CCNF concentration increases to 1.0 wt%, the foam initial drainage of SDS/FC1157 solution is delayed for about 3 min. Increasing CCNF concentration can slow down foam coarsening process and liquid drainage process of SDS/FC1157 and CTAB/FC1157 solutions, improving the foam stability. The foam stability enhancement of CTAB/FC1157-CCNF solution is due to the formation of bulk aggregates and the increase of viscosity. However, the foam stability enhancement of SDS/FC1157-CCNF solution may be caused by the increase of viscosity. CCNF significantly reduces the foaming ability of CTAB/FC1157 solution when CCNF concentration is >0.5 wt%. Nevertheless, the foaming ability of SDS/FC1157 solution decreases significantly when CCNF concentration reaches 3.0 wt%, and its foaming ability remains higher than CTAB/FC1157 solution. The foaming ability of SDS/FC1157-CCNF solution is mainly dominated by viscosity, while that of CTAB/FC1157-CCNF solution is dominated by viscosity and adsorption kinetics. Adding CCNF is expected to enhance the stability of firefighting foam and increase the efficiency of extinguishing fire.