Abstract Coagulase-negative Staphylococcus (CoNS) is the most common pathogen causing traumatic endophthalmitis, Staphylococcus epidermidis is the most common species which colonizes human skin, eye surfaces and nasal cavity and is the main cause of nosocomial infection, specially foreign body-related bloodstream infections (FBR-BSIs). Although some studies have reported the genome characteristics of S. epidermidis , a comprehensive understanding of its pathogenicity and the genome of ocular trauma-sourced strains is still lacking. In this study, we sequenced, analyzed and reported the whole genomes of 11 ocular trauma-sourced samples of S. epidermidis that caused traumatic endophthalmitis. By integrating publicly available genomes, we obtained a total of 187 S. epidermidis samples from healthy and diseased eyes, skin, respiratory tract and blood. Combined with pangenome, phylogenetic and comparative genomic analyses, our study supported that S. epidermidis , regardless of niche source, exhibits two founder lineages with different pathogenicities. Moreover, we identified potential biomarkers associated with the virulence of S. epidermidis , namely, essD , uhpt , sdrF , sdrG , fbe and icaABCDR . The essD and uhpt genes have high homology with esaD and hpt in Staphylococcus aureus , showing that the genomes of S. epidermidis and S. aureus may have communicated during evolution, while the sdrF , sdrG , fbe , and icaABCDR genes are related to biofilm formation. Compared to S. epidermidis from blood sources, ocular-sourced strains causing intraocular infection had no direct relationship with biofilm formation. In conclusion, this study not only provided additional data resources for studies on S. epidermidis is, but also improved understanding of the evolution and pathogenicity of different source strains. Importants In this study, we comprehensively analysied and reported the whole genome sequence (WGS) of the strains that caused traumatic endophthalmitis. Through comparative genomic analyses among 187 S. epidermidis samples from healthy and diseased eyes, skin, respiratory tract and blood, we identified 10 potential biomarkers of pathogenic strains. Finally, we revealed S. epidermidis -induced traumatic endophthalmitis may be independent of biofilm formation. Overall, our data may facilitate comparative research of S. epidermidis and provide clinical value for identifying pathogenic or contaminating strains.