β-Ga
2O
3-based deep-ultraviolet photodetector (PD) has versatile civil and military applications especially due to its inherent solar-blindness. In this work, pristine and N-doped
β-Ga
2O
3 thin films are prepared on
c-plane sapphire substrates by radio frequency magnetron sputtering. The influences of N impurity on the micromorphology, structural and optical properties of
β-Ga
2O
3 film are investigated in detail by scanning electron microscopy, X-ray diffraction, and Raman spectra. The introduction of N impurities not only degrades the crystal quality of
β-Ga
2O
3 films, but also affects the surface roughness. The
β-Ga
2O
3 films doped with N undergoes a transition from a direct optical band gap to an indirect optical band gap. Then, the resulting metal-semiconductor-metal (MSM) PD is constructed. Comparing with the pure
β-Ga
2O
3-based photodetector, the introduction of N impurities can effectively depress dark current and improve response speed of the
β-Ga
2O
3 device. The N-doped
β-Ga
2O
3-based photodetector achieves a dark current of 1.08 × 10
–11 A and a fast response speed (rise time of 40 ms and decay time of 8 ms), which can be attributed to the decrease of oxygen vacancy related defects. This study demonstrates that the acceptor doping provides a new opportunity for producing ultraviolet photodetectors with fast response for further practical applications.