Recent studies have shown that bacterial membrane potential is dynamic and plays signalling roles. Yet, little is still known about the mechanisms of bacterial membrane potential regulation –owing in part to a scarcity of appropriate research tools. Optical modulation of bacterial membrane potential could fill this gap and provide a new approach to studying and controlling bacterial physiology and electrical signalling. Here, we show that a membrane-targeted azobenzene ( Ziapin2 ) can be used to photo-modulate the membrane potential in cells of the Gram-positive bacterium Bacillus subtilis . We found that upon exposure to blue-green light (λ = 470 nm), isomerization of Ziapin2 in the bacteria membrane induces hyperpolarisation of the potential. In order to investigate the origin of this phenomenon we examined ion-channel-deletion strains and ion channel blockers. We found that in presence of the chloride channel blocker idanyloxyacetic acid-94 (IAA-94) or in absence of KtrAB potassium transporter, the hyperpolarisation response is attenuated. These results reveal that the Ziapin2 isomerization can induce ion channel opening in the bacterial membrane, and suggest that Ziapin2 can be used for studying and controlling bacterial electrical signalling. This new optical tool can contribute to better understand microbial phenomena, such as biofilm electric signalling and antimicrobial resistance.