Ultraviolet (UV) radiation impacts various aspects of human beings, and there has been significant interest in membrane materials with UV shielding. However, conventional ultraviolet shielding materials are typically petroleum-based polymers like polyethylene, which pose challenges in terms of degradation and reusability, leading to environmental pollution and other issues. The development of environmentally friendly bio-based UV shielding film materials from wood fiber raw materials holds immense importance for sustainable development. In this study, TEMPO-oxidized cellulose nanocellulose crystals (TOCNC) were utilized as the starting material to obtain modified nanocellulose suspension through amination with aniline and acetamide. Subsequently, nanocellulose films were prepared and characterized for their morphology and structure analysis. With the presence of carboxyl groups on TOCNC along with the incorporation of functional groups such as benzene rings, the absorption rate of the TOCNC composite film reaches 93.2% across the entire ultraviolet absorption spectrum, significantly enhancing its UV shielding performance. The proposed film exhibits great potential for applications in UV-sensitive food packaging, electronic product packaging materials, plastic films, etc.