The physicochemical properties of a semiconductor surface, especially in low-dimensional nanostructures, determine the electrical and optical behavior of the devices. Thereby, the precise control of surface properties is a prerequisite for not only preserving the intrinsic material quality but also manipulating carrier transport behavior for promoting device characteristics. Here, we report a facile approach to suppress the photocorrosion effect while boosting the photoresponse performance of n-GaN nanowires in a constructed photoelectrochemical-type photodetector by employing Co3O4 nanoclusters as a hole charging layer. Essentially, the Co3O4 nanoclusters not only alleviate nanowires from corrosion by optimizing the oxygen evolution reaction kinetics at the nanowire/electrolyte interface but also facilitate an efficient photogenerated carrier separation, migration, and collection process, leading to a significant ease of photocurrent attenuation (improved by nearly 867% after Co3O4 decoration). Strikingly, a record-high responsivity of 217.2 mA W-1 with an ultrafast response/recovery time of 0.03/0.02 ms can also be achieved, demonstrating one of the best performances among the reported photoelectrochemical-type photodetectors, that ultimately allowed us to build an underwater optical communication system based on the proposed nanowire array for practical applications. This work provides a perspective for the rational design of stable nanostructures for various applications in photo- and biosensing or energy-harvesting nanosystems.