The active components, potential targets, and mechanisms of action of oregano essential oil in the treatment of bovine mastitis disease were investigated using network pharmacology and molecular docking approaches. The TCMSP and literature databases were examined for the main compounds in oregano essential oil. Afterward, the physical, chemical, and bioavailability characteristics of the components were evaluated. The PubChem, BATMAN, PharmMapper, and Uniprot databases were utilized to predict the target genes of the major components of oregano essential oil. Via the databases of DrugBank, OMIM, GeneCards, TTD, and DisGenet, the disease targets of bovine mastitis were discovered. We analyzed common targets and built protein–protein interaction (PPI) networks using the STRING database. Key genes were analyzed, obtained, and compound–target–pathway–disease visualization networks were created using Cytoscape. For the GO function and KEGG pathway enrichment analysis, the DAVID database was utilized. Molecular docking via Autodock Tools was utilized to evaluate the reliability of the interactions between oregano essential oil and hub targets. Thymol, carvacrol, and p-cymene are the three major components found in oregano essential oil. The potential targets (TNF, TLR4, ALB, IL-1β, TLR2, IL-6, IFNG, and MyD88) were screened according to the visual network. The enrichment analysis suggested that the major signaling pathways in network pharmacology may include PI3K-Akt, MAPK, IL-17, and NF-κ B. Molecular docking analysis shows that thymol had good docking activity with TNF, IL-6, and MyD88, carvacrol had good docking activity with TNF, and p-cymene had good docking activity with ALB. This study clarified the mechanism of action of oregano essential oil in the treatment of bovine mastitis, thus providing data supporting the potential for the use of oregano essential oil in the development of new therapeutics for bovine mastitis.