Introduction: Nature is full of surprises; it gives us problems along with solutions, but the only condition is that it needs to be explored. The ability of endophytes to tackle pathogens is one such example that falls within the context of the current work. In the current study, we have assessed the antifungal potential of endophytic bacterial metabolites of medicinal importance through in-vitro and in-silico studies. Materials and Methods: Bioactive metabolites from Staphylococcus species, an endophytic bacterium, were extracted to assess their antifungal potential through disc diffusion assays and minimum inhibitory concentration determination. Gas Chromatography-Mass Spectroscopy characterized the diverse composition of the endophytic extracts. The interactions between these metabolites and target proteins, such as CYP51B in Aspergillus fumigatus, were revealed by in-silico studies, which included molecular docking and dynamics simulations. This provided a thorough understanding of the antifungal qualities inherent in endophytic bacterial metabolites. Results: The research findings highlighted that the zone of inhibition (ZOI) exhibited by the crude extract from Staphylococcus endophytes (23.6±1.24 mm) is comparable to that of the control, Voriconazole (23±0.82 mm). Additionally, the minimum inhibitory concentration of the crude extract (0.21±0.06 mg/ml) is lower than the control (0.33±0.11 mg/ml). Notably, among the 45 identified endophytic metabolites, Pyrrolo [1,2-a]pyrazine-1,4-dione, hexahydro-3- (phenylmethyl), demonstrated superior inhibition efficacy against CYP51B (PDB Id: 4UYM) of Aspergillusfumigatusascompared to Voriconazole. These findings emphasized the potential of the identified metabolite as a promising antifungal agent. Conclusion: The endophytic metabolite, Pyrrolo [1,2-a]pyrazine-1,4-dione, hexahydro-3- (phenylmethyl), showcased significant antifungal potential as a therapeutic agent against fungal infections.