A three-dimensional protein nanopatterning method has been developed, based on local activation of porous silicon by electron beam. Proteins specifically bind to irradiated regions, and the depth of biomolecule nanopatterns can be controlled by varying the electron energy. This unique feature permits exploitation of the huge surface area of the sponge-like material, thus allowing concentration of a large amount of proteins on nanosized patterns. Moreover, the grafted biomolecules retain their full functionality, and the feasibility of a glucose sensor has been demonstrated.