Abstract Ultraviolet (UV) photodetectors have gained much attention due to their numerous important applications ranging from environmental monitoring to space communication. To date, most p‐NiO/n‐Si heterojunction photodetectors (HPDs) exhibit poor UV responsivity and slow response. This is mainly due to a small valence band offset (Δ E V ) at the NiO/Si interface and a high density of dangling bonds at the silicon surface. Herein, an UV HPD consisting of NiO/Al 2 O 3 /n‐Si is fabricated using magnetron sputtering technique. The HPD has a large rectification ratio of 2.4 × 10 5 . It also exhibits excellent UV responsivity ( R ) of 15.8 A/W at −5 V and and detectivity ( D* ) of 1.14 × 10 13 Jones at −4 V, respectively. The excellent performance of the HPD can be attributed to the defect passivation at the interfaces of the heterojunction and the efficient separation of photogenerated carriers by the Al 2 O 3 nanolayer. The external quantum efficiency ( EQE ) of the HPD as high as 5.4 × 10 3 %, hence implying a large optical gain due to carrier proliferation resulting from impact ionization. Furthermore, the ultrafast response speed with a rise time of 80 µs and a decay time of 184 µs are obtained.