Bacterial biofilms are a serious global health concern, often responsible for persistent infections. New strategies to prevent and treat bacterial infections via eradication of the biofilms are urgently needed. A novel ruthenium-based compound was reported in this study that functions as both a boronic acid-decorated photosensitizer (PS) and a light-triggered nitric oxide (NO) releasing agent. The compound could selectively attach to the bacterial membrane and biofilms. And it is highly potent to eradicate P. aeruginosa biofilms via the simultaneous release of NO as well as reactive oxygen species (ROS), which is more effective than clinical antibiotics tobramycin. The compound also has excellent bacterial specificity and shows no significant cytotoxicity to human cells. The results reveal potential applications of this innovative dual-functional photoactivated ruthenium compound to combat bacterial biofilm infections.