Abstract Staphylococcus aureus (S. aureus) is an opportunistic pathogen frequently associated with subclinical mastitis and accounts for a large proportion of the economic losses due to mastitis on Canadian dairy farms. Despite a plethora of investigations on the molecular mechanisms of mastitis, little information is available on the roles of regulatory noncoding RNAs (ncRNA). This study aimed to uncover the regulatory roles of microRNAs (miRNAs) and long noncoding RNAs (lncRNAs) in the response to subclinical mastitis due to S. aureus of cows. Transcriptome sequencing (RNA-Seq and miRNA-Seq) was conducted on milk somatic cells from 13 cows with S. aureus subclinical mastitis [high somatic cell counts (SCC) of ≥350,000 cells/mL for ≥3 consecutive months and positive for S. aureus only], and 5 healthy cows (low SCC< 100,000 cells/mL for ≥3 consecutive months and negative for mastitis pathogens). RNASeq and smRNASeq nf-core bioinformatics pipelines were used to process the data. Results showed that 97 miRNAs (36 up-regulated and 61 down-regulated) and 1,565 lncRNAs (617 up-regulated and 948 down-regulated) were differentially expressed (DE; FDR< 0.05) between S. aureus subclinical mastitic cows and healthy controls. Competing endogenous networks comprising co-expressed differentially expressed mRNAs (DEGs), miRNAs (DEMs), and lncRNAs (DELs) were constructed. CytoHubba, a Cytoscape plugin, was utilized to identify the top hub regulatory ncRNAs including bta-miR-2387, bta-miR-331, bta-miR-95, bta-miR-744, bta-miR-455, bta-novel-miR-60, bta-miR-3533, bta-miR-500, bta-miR-1249 and bta-novel-miR-66). The results revealed that the main hubs (downregulated bta-miR-2387 and upregulated bta-miR-331) potentially regulate numerous DEGs during S. aureus subclinical mastitis such as NFKB1, IL10RA, IL17RA, TLR10, LOC112442665, LOC112448481 and LOC112442015, etc., and TUNAR, LOC112445429, LOC112444484 and LOC101907369, respectively. Functional analysis of bta-miR-331 target genes revealed roles in several KEGG pathways (e.g., tight junction, bacterial invasion of epithelial cells) and biological processes gene ontology (GO) terms (e.g., cell adhesion, cell locomotion and cell motility). Similarly, roles for bta-miR-2387 in KEGG pathways like JAK-STAT signaling pathway, NOD-like receptor signaling pathway and inflammatory bowel disease, and biological process GO terms such as inflammatory response, neutrophil migration, leucocyte migration and response to cytokine were revealed. MiR-331 has been found to promote cell proliferation, migration, and invasion of breast cancer. Furthermore, bta-miR-2387 has been shown to regulate several immune pathways which aid in improving the movement of spermatids across the epithelium and preleptotene spermatocytes across the blood-testis barrier during spermatogenesis. This supports our findings and suggests that bta-miR-2387 and bta-miR-331 could be pivotal regulators of immune-related genes and pathways during S. aureus subclinical mastitis. Thus, they hold potential as biomarkers for the development of therapeutic and diagnostic tools for managing subclinical mastitis.