Narrowband photodetectors with wavelength-selective response are vital for environmental monitoring and biomedical sensing. Perovskites offer tunable bandgaps but lag behind traditional detectors with optical filters. We constructed a dynamic space charge region model in perovskite single crystals, where mobile ions suppress above-bandgap photons while amplifying band-edge photons and enabling adjustable narrowband wavelengths. This yields a record full width at half maximum of 9.0 nm. We further developed a portable water pollutant detector using these devices, achieving a limit of detection an order of magnitude lower than commercial silicon photodetectors with complex filters.