In this study, the high-quality GaN films are prepared by a simple, green and low-cost plasma enhanced chemical vapor deposition (PECVD) method at 950 ℃, with Ga<sub>2</sub>O<sub>3</sub> and N<sub>2</sub> serving as a gallium source and a nitrogen source, respectively. In order to improve the crystal quality of GaN films and ascertain the photoresponse mechanism of GaN films, the effect of the preparation temperature of GaN buffer layer on the crystal quality and photoelectric properties of GaN thin films are investigated. It is indicated that with the increase of the buffer temperature of GaN films, the crystal quality of GaN films first increases and then decreases, and the highest crystal quality is obtained at 875 ℃. When buffer layer temperature is 875 ℃, the calculated total dislocation density is 9.74 × 10<sup>9</sup> cm<sup>–2</sup>, and the carrier mobility is 0.713 cm<sup>2</sup>·V<sup>–1</sup>·s<sup>–1</sup>. The crystal quality of GaN film after being annealed is improved. The total dislocation density of GaN film decreases to 7.38 × 10<sup>9</sup> cm<sup>–2</sup>, and the carrier mobility increases to 43.5 cm<sup>2</sup>·V<sup>–1</sup>·s<sup>–1</sup>. The UV-Vis absorption spectrum results indicate that the optical band gap of GaN film is 3.35 eV. The scanning electron microscope (SEM) results indicate that GaN film (buffer layer temperature is 875 ℃) has smooth surface and compact structure. The Hall and X-ray photoelectron spectroscopy (XPS) results indicate that there are N vacancies, Ga vacancies or O doping in the GaN film, which act as deep level to capture photogenerated electrons and holes. With the bias increasing, the photoresponsivity of the GaN film photodetector gradually increases and then reaches a saturation value. This is due to the deep levels produced by vacancy or O doping. In addition, photocurrent response and recovery of GaN film are slow, which is also due to the deep levels formed by vacancy or O doping. At 5-V bias, the photoresponsivity of GaN film is 0.2 A/W, rise time is 15.4 s, and fall time is 24 s. Therefore, the high-quality GaN film prepared by the proposed green and low-cost PECVD method present a strong potential application in ultraviolet photodetector. The PECVD method developed by us provides a feasible way of preparing high-quality GaN films, and the understanding of the photoresponse mechanism of GaN films provides a theoretical basis for the wide application of GaN films.