Solutions of cellulose in a mixture of tetrabutylammonium fluoride and dimethyl sulfoxide (TBAF/DMSO) containing small and varying amounts of water were studied by nuclear magnetic resonance (NMR). By measuring the composition dependences of 19F NMR and 1H NMR chemical shifts and line widths, details on the dissolution and gelation mechanisms for cellulose in TBAF/DMSO were elucidated. Our results suggest that the strongly electronegative fluoride ions act as hydrogen bond acceptors to cellulose hydroxyl groups, thus dissolving the polymer by breaking the cellulose-cellulose hydrogen bonds and by rendering the chains an effective negative charge. It was found that the fluoride ions also interact strongly with water. Small amounts of water remove the fluoride ions from the cellulose chains and allow reformation of the cellulose-cellulose hydrogen bonds, which leads to formation of highly viscous solutions or gels even at low cellulose concentrations.