Objective: To investigate the use of vancomycin in ophthalmology department and evaluate its off-label drug use, thereby providing references for clinical practice. Methods: A retrospective analysis was conducted, selecting 159 inpatients who received vancomycin treatment in the Department of Ophthalmology of our hospital from January 1, 2022 to December 31, 2024. The basic information of the patients, details of vancomycin, microbial testing results, and off-label drug use were evaluated and analyzed. Results: Among the 159 patients, male patients accounted for 76.1%, and there were mainly distributed in the fundus disease area. The primary pathogenic factor was ocular trauma (102/159,64.15%), followed by surgical causes (36/159,22.64%). The main route of vancomycin administration was intravitreal injection, primarily for therapeutic purposes. It was often combined with ceftazidime to treat intraocular infections. The submission rate of pathogenic bacteria was 75.47%, and the specimen detection rate was 35.07%. There were 33 cases of gram-positive bacteria, accounting for 80.49%, mainly Staphylococcus epidermidis; 5 cases of gram-negative bacteria, accounting for 12.20%, including Escherichia coli, Pseudomonas aeruginosa, etc.; and 4 cases of fungi, accounting for 9.76%, mainly Aspergillus. Off-label drug use included intravitreal injections, intraocular lavage, and the use of drugs highly suitable for the preventing endophthalmitis. Endogenous infections were mainly caused by gram-negative bacteria. The evidence-based medicine support for vancomycin intravitreal injection in the treatment of endophthalmitis is strong. The recommended grade and evidence strength of off-label use of intravitreal injection are higher than those of intraocular lavage and off-label use. Conclusions: Vancomycin is widely used in ophthalmology, and its indications, usage, and dosage should be strictly controlled. Off-label drug use should be used with caution after a comprehensive evaluation of its rationality and safety. This study holds significant clinical value and practical significance for the standardized use of vancomycin, the revision of drug instructions, and individualized treatment.