Water is an important raw material in the food production process. Maintaining the quality and safety of water is very important in the food field. In this study, a simple novel fluorescent nanocellulose hydrogel (FNH) was prepared for the detection and removal of heavy metals (Fe3+ and Pb2+) in aqueous solutions based on carbon dots (CDs). The CDs were grafted onto the carboxylated nanocellulose (CNC) by the EDC/NHS coupling method, and then the nanocellulose (NC), CNC, and FNH were characterized by FTIR analysis. The effect of adsorption environment on FNH adsorption capacity was also investigated. After carboxylation and grafting of CDs, the adsorption capacity of nanocellulose to Fe3+ and Pb2+ was greatly improved, and it was also allowed to make fast visual responses to Fe3+ as an optical sensor to determine the concentration of Fe3+ through the visual signal. Static adsorption experiment demonstrated that the removal rate of Fe3+ and Pb2+ by FNH exceeded 69.4% and 98.2%, and the adsorption capacity amount reached 98.3 mg/g and 442.0 mg/g. At the same time, due to the fluorescence quenching effect of Fe3+, FNH could also be used for the detection of Fe3+ concentration in aqueous solution, and the limit of detection (LOD) could reach 62.5 mg/L.