The invention belongs to the photoelectric device technology field and especially discloses a manufacturing method of a two-dimensional ordered TiO2 nanometer well film and an application in a self-energized photoelectric device. In the invention, firstly, a two-dimensional ordered TiO2 nanometer well film is manufactured; and then the manufactured TiO2 nanometer well film is taken as a substrate so as to manufacture a heterojunction compound with inorganic-substance layered NiO organic semiconductor polyaniline; and a self-energized photoelectric detector is constructed. The method comprises the following steps of anodic oxidation, physical stripping, heating calcinations, low temperature hydrothermal treatment, in situ polymerization and the like. In the invention, a complex and expensive manufacturing technology of the photoelectric device is avoided and rapid construction of a large-scale device can be realized; a photovoltaic effect of a p-n junction is used, under zero-bias driving, photon-generated carriers are rapidly separated under a built-in potential effect, self-energized performance of the device is realized and a light current is stable and a response speed is fast; and for ultraviolet light, good selection performance is possessed, and the photoelectric detector can be served as an energy-saving high frequency detector and a high-frequency photoelectric converter and can be applied in the fields of optical communication, military, medical treatment, photoelectric storage and the like.