Narrowband photodetection systems are widely used in fluorescence detection, artificial vision and other fields. In order to realize the narrow spectral detection of special band, it is traditionally necessary to integrate broadband detectors with optical filters. However, with the development of detection technology, higher requirements have also been placed on the power consumption, size, and cost of the detection system, and the applications of traditional narrowband photodetectors with complex structures and high costs are limited. Thus, a filterless, narrowband near-ultraviolet photodetector based on a porous GaN/CuZnS heterojunction is demonstrated. The porous GaN thin films with low defect density and CuZnS thin films with high hole conductivity are fabricated by photoelectrochemical etching and water bath growth methods, respectively, and the porous GaN/CuZnS heterojunction near-ultraviolet photodetectors are thus fabricated. Benefiting from the porous structure of GaN and the optical filtering effect of CuZnS, the photo-dark current ratio of the device exceeds four orders of magnitudes under –2 V bias and 370 nm light illumination; more importantly, the device has an ultra-narrowband near-ultraviolet photoresponse with a full width at half maximum of <8 nm (peak at 370 nm). In addition, the peak responsivity, external quantum efficiency and specific detectivity reach 0.41 A/W, 138.6% and 9.8×10<sup>12</sup> Jones, respectively. These excellent device performances show that the near-ultraviolet photodetectors based on porous GaN/CuZnS heterojunctions have broad application prospects in the field of narrow-spectrum ultraviolet photodetection.