The invention provides a mesoporous 
silicon film and a two-step preparation method and application thereof. The preparation method comprises the following steps: putting cotton into a 
sulfuric acid solution, stirring and reacting, taking out the cotton after the reaction, diluting with 
distilled water, standing for layering; carrying out 
centrifugal separation on the lower layer of a suspension, washing; carrying out 
dialysis on the centrifuged suspension, adjusting the pH, carrying out ultrasonic treatment to obtain nanocrystalline 
cellulose; carrying out ultrasonic treatment on the nanocrystalline 
cellulose, putting the nanocrystalline 
cellulose into a round-bottom flask, adding glucose, stirring evenly, adding tetraethl 
silicate, stirring and 
drying to obtain a mesoporous 
silicon film A; calcining the mesoporous 
silicon film A to obtain a mesoporous silicon film B; putting the mesoporous silicon film B into methylbenzene, introducing 
nitrogen, dropwise adding 
triethylamine, introducing 
nitrogen, dropwise adding Diethylphosphatoethyltriethoxysilane, sealing, and shaking to obtain a mesoporous silicon film C; putting the mesoporous silicon film C into concentrated 
hydrochloric acid and reacting to obtain a mesoporous silicon film D; and washing the mesoporous silicon film D and 
drying to obtain the final mesoporous silicon film. According to the invention, 
biomass cellulose is used as a template, has a wide range of sources and is green and 
environmentally friendly.