Self-powered photoelectrochemical-type (PEC) ultraviolet photodetectors (UV PDs) have been rapidly developed owing to their low-cost fabrication and good photodetection. However, achieving high-performance and self-powered PEC UV PDs based on an individual material is still challenging. Therefore, developing more wide bandgap semiconductors for high-performance PEC UV PDs is attractive. Here, we demonstrate that ZnAl-LDH is suitable for self-powered PEC UV PDs with high responsivity and excellent wavelength selectivity for the first time. The responsivity is 29.25 mA/W (254 nm irradiation) and the UV/visible rejection ratio is 1037, surpassing most PEC UV PDs. Furthermore, the PEC UV PDs have fast response, good stability, and underwater optical communication capability. This work offers more chances for the development of high-performance PEC UV PDs and demonstrates the potential application of ZnAl-LDH in underwater optoelectronic devices.