• Sensitive photoelectrochemical method was developed for histone acetyltransferase detection. • WS 2 and black TiO 2 heterojunction presented strong photoelectrochemical response. • Solid electron donor of polydopamine can effectively improve the photoactivity of WS 2 and black TiO 2 . • This method can also be applied for the inhibitor screening. A kind of novel heterojunction structure with black TiO 2 and WS 2 was prepared with matched energy band and significantly improved visible-light-driven photoelectrochemical activity. Then, to further improve the photoelectrochemical activity of this heterojunction, solid-state electron donor of polydopamine was employed with satisfactory result. The band gap, potential of conduction band and valence band was investigated using Mott-Schottky curve, VB-XPS and UV–vis diffuser reflectance techniques. These materials were also characterized by SEM, TEM, XRD, IR, Roman spectra, and EPR image. The improved photoactivity was confirmed by monitoring and comparing the photocurrent response of black TiO 2 , WS 2 and Black TiO 2 /WS 2 heterojunction. To explore the applicability of this novel heterojunction structure, a kind of photoelectrochemical biosensor was constructed for histone acetyltransferase p300 detection using black TiO 2 and WS 2 as photoactive material and polydopamine as electron donor. Under optimized conditions, the photoelectrochemical biosensor shows wide linear range from 0.01 to 500 nM for histone acetyltransferase p300 detection. The detection limit is 0.0033 nM (S/N = 3). The sensor has good selectivity, stability and reproducibility. The inhibition tests show that aminoglycoside antibiotics significantly inhibits the activity of histone acetyltransferase and the IC 50 of typical tobramycin, streptomycin sulfate and kanamycin sulfate were 10.41, 13.31 and 15.42 μM, respectively.