The invention provides a photoelectric detector and a preparation method thereof, and relates to the technical field of photoelectric detectors. The photoelectric detector comprises a substrate, a metal nanoparticle layer formed by rapid annealing a metal film layer, a metal seed crystal layer, a metal nanowire array, an insulating material, a first metal electrode and a second metal electrode. According to the photoelectric detector and the preparation method thereof provided by the invention, the metal nanoparticle layer is inserted between the metal seed crystal layer and the metal nanowirearray, so that the separation rate of photo-induced electron hole pairs in the photoelectric detector can be improved, and the illumination response speed is further improved; and by changing the material, the thickness, the annealing temperature, the annealing time and the annealing gas atmosphere of the metal film layer, the property of the metal nanoparticle layer can be changed, the absorption accuracy of the photoelectric detector on incident light is further improved, and the tunable wavelength absorption range of the incident light is realized.