Macroporous and luminescent nanoporous Si are formed on Si wafers, which are modified with fine metal particles, by simply immersing the wafers in a HF solution without a bias or an oxidizing agent. The metal particles are deposited onto n-Si wafers by electroless displacement deposition from a metal salt solution including HF. The etching of Si consists of a local cathode reduction of oxygen and a local anode oxidation of Si. The porous layer is formed only on the metal-particle-deposited area of the Si wafers. The etching rate and surface morphology of Si change with the etching conditions such as dissolved oxygen concentration, kinds of metal particles, and photoillumination intensity during etching. The micrometersized macroporous Si layer is effective for the antireflection of solar cells. Efficient photoelectrochemical solar cells can be prepared by entire chemical modification of the n-Si surface.