The polarity of the photocurrent can be modulated by tunable bipolar photoelectrochemical (PEC) behavior, which is anticipated to address the issues of high background signal caused by traditional unidirectional increasing/decreasing response and false-positive/false-negative problems. Here, a new approach is suggested for the first time, which employs a target-induced enzyme-catalyzed reaction and in situ oxygen vacancy (OV) generation to achieve heterojunction photocurrent switching for highly sensitive detection of alkaline phosphatase (ALP). Among them, the ALP can catalyze the decomposition of ascorbic acid phosphate to produce ascorbic acid, which not only acts as an electron donor to change the redox environment but also acts as a reducing agent to introduce OVs into BiOBr semiconductors in cooperation with illumination. The introduction of vacancies can effectively modulate the energy band structure of BiOBr, while with the change of redox conditions, the transfer path of photogenerated carriers is changed, thus realizing the switching of photocurrents, which leads to its use in the construction of a negative-background anti-interference PEC sensing platform, achieving a wide linear range from 0.005 to 500 U•L −1 with a low detection limit of 0.0017 U•L −1 . In conclusion, the photocurrent switching operation of this system is jointly regulated by chemistry, optics, and carrier motion, which provides a new idea for the construction of a PEC sensing platform based on photocurrent polarity switching.