Liquid hot water (LHW) pretreatment is an environmentally friendly that uses hot water under certain pressure to break down biomass in the absence of chemicals. In this paper, bamboo was used as the substrate to prepare the lignin-containing cellulose nanofibers (LCNFs) and xylo-oligosaccharides (XOS) using LHW strategy. The results showed that a total xylose yield of 63.95 % was achieved in only 20 min, with a high total xylose selectivity of 96.6 %. Meanwhile, a cellulose retention rate of 99.7 % was also achieved. The optimal conditions obtained from the 100 mL reactor were validated through three parallel experiments using the 2 L reactor, and the residue was treated with 1.5 wt% NaOH to reduce the lignin content. LCNF was obtained through ball milling and ultrasonic treatment, and the LCNF film was prepared using an evaporation-induced self-assembly approach, which showed excellent mechanical properties, including tensile strength (109.4 MPa), Young's modulus (1.4 GPa) and elongation at break (28.3 %). Additionally, the LCNF films exhibited effective UV-shielding capacity. This study achieved the full component utilization of bamboo for the co-production of high value-added chemicals and biomass-based materials. Graphical abtsract.