We show that a high-efficiency diffraction grating can be embedded into nanoparticulate TiO2 film via imprinting combined with TiCl4 treatment. The grating-embedded film consists of two layers in intimate contact. A thin TiO2 layer was first patterned on a glass substrate by imprinting. The patterned layer was TiCl4-treated with a higher concentration than the over-coated thicker layer, so that it diffracts incident light as a refractive-index grating. Gratings with a period scaled down to 1 µm could be embedded into the film. Diffraction efficiency increased with an increasing grating height and an efficiency over 80% was achieved in the near-ultraviolet and visible range. Dye-sensitized solar cells fabricated using a grating-embedded TiO2 photoanode exhibited much better photovoltaic performance than those without a grating. It was also found that the incorporation of a diffraction grating greatly enhances the photocatalytic activity of nanoparticulate TiO2 film. All these are attributed to improved light harvest.