Bacterial endophthalmitis is an acute progressive visual threatening disease and one of the most important causes of blindness worldwide. Current treatments are unsatisfactory due to the emergence of drug-resistant bacteria and the formation of biofilm. The aim of our research was to construct a novel nano-delivery system with better antimicrobial and antibiofilm effects. This study developed a novel antibiotic nanoparticle delivery system (MXF@UiO-UBI-PEGTK), which is composed of (i) moxifloxacin (MXF)-loaded UiO-66 nanoparticle as the core, (ii) bacteria-targeting peptide ubiquicidin (UBI29-41) immobilized on UiO-66, and (iii) ROS-responsive poly (ethylene glycol)-thioketal (PEG-TK) as the surface shell. Then the important properties of the newly developed delivery system, including biocompatibility, toxicity, release percentage, thermal stability, ability of targeting bacteria, and synergistic antibacterial effects on bacterial biofilms and endophthalmitis, were evaluated. In vitro, MXF@UiO-UBI-PEGTK exhibited significant antibiotic effects including the excellent antibiofilm property against Staphylococcus aureus, Pseudomonas aeruginosa, and methicillin-resistant Staphylococcus aureus at high levels of ROS. Moreover, MXF@UiO-UBI-PEGTK demonstrated outstanding efficacy in treating bacterial endophthalmitis in vivo. This novel nanoparticle delivery system with ROS-responsive and bacteria-targeted properties promotes the precise and effective release of drugs and has significant potential for clinical application of treating bacterial endophthalmitis.