Staphylococcus aureus, a prevalent pathogen associated with infectious and foodborne diseases, is also a significant cause of intramammary infections in dairy farms. This study aimed to determine the phenotypic and molecular characterization of S. aureus in two different stock sizes of dairy farms in Henan province (HN) and the Inner Mongolia autonomous region (IM), China, through biofilm formation, antimicrobial resistance, virulence, and molecular type of S. aureus isolates. In HN, 74 S. aureus isolates (60.7%) were recovered from 122 bulk tank milk samples, while in IM, 24 S. aureus isolates (17.4%) were detected from 161 samples soured from various origins. Notably, 25.7% (19/74) of isolates in HN and 20.8% (5/24) in IM exhibited multidrug-resistant (MDR) phenotypes. Molecular typing revealed distinct patterns: ST97 (n = 32) and spa type t189 (n = 20) predominated in HN, whereas ST50 (n = 13) and spa type t518 (n = 11) were prevalent in IM. Additionally, three isolates harbored both tsst-1 and lukF-PV genes, and two MRSA strains displayed a MDR phenotype in raw milk samples from HN. Biofilm formation was observed in 91.8% strains. Phylogenetic analysis identified two subpopulations (lineages 1 and 2). Among them, cluster 6 in lineage 2 comprised S. aureus strains from three sources within a farm, suggesting potential cross contamination during different stages in IM. Remarkably, among 19 MDR isolates in HN, ST398 MSSA strains exhibited a higher multidrug resistance compared to non-ST398 MSSA strains. This study underscores the high prevalence and diverse characteristics of S. aureus in raw milk, necessitating enhanced surveillance and control measures to mitigate associated risk.