Abstract:β-Ga?O? has emerged as an ideal material for solar-blind ultraviolet photodetectors due to its ultra-wide bandgap of 4.8 eV, though its poor p-type conductivity restricts device performance. In this study, a NiO/β-Ga?O? heterojunction was constructed using Sentaurus TCAD simulations to comparatively analyze the effects of uniform doping versus gradient doping in Ga?O? layer on photodetector performance. Results demonstrate that the gradient-doped device achieves 28% higher responsivity (519 mA/W vs. 406 mA/W) under 254 nm illumination, along with enhanced external quantum efficiency (EQE) of 2.61%. Concurrently, the dark current density decreases significantly from 4.088×10?? A/cm2 to 1.204×10?11 A/cm2. Through electric field distribution and band structure analysis under varying light intensities, we propose that gradient doping induces expansion of space charge regions and optimization of built-in electric fields. These modifications reduce carrier recombination probability while improving separation and collection efficiency of photogenerated carriers. The gradient doping strategy demonstrates remarkable potential in optimizing carrier transport, suppressing dark current, and enhancing response speed, offering novel insights for developing wide-bandgap semiconductor optoelectronic devices.