Objective To analyze the colonization status of Streptococcus agalactiae (S. agalactiae) in women during late-pregnancy and the infection status in infants, as well as the drug resistance of S. agalactiae. Methods This study screened 137 790 late-pregnancy women registered at Maternity and Child Health Care of Guangxi Zhuang Autonomous Region from 2017 to 2023 (including 24 723 who delivered at this institution), with concurrent retrospective analysis of clinical data from 48 927 hospitalized infants aged 0-3 months, to characterize both maternal S. agalactiae colonization patterns in late pregnancy and S. agalactiae infection profiles in young infants. Drug susceptibility tests were performed on the strains isolated from S. agalactiae-positive pregnant women who delivered in this hospital and S. agalactiae-infected infants hospitalized during the same period. Results Among the 137 790 women during late-pregnancy, the positive detection rate of S. agalactiae was 12.56% (17 303/137 790), and the detection rate of anal swabs (9.81%, 13 519/137 790) was higher than that of vaginal swabs (7.88%, 10 862/137 790) (P<0.05). Among the 24 723 pregnant women who delivered in that hospital, 452 were detected as S. agalactiae-positive, and a total of 523 strains of S. agalactiae were isolated. Among the 48 927 infants hospitalized during the same period, 43 were diagnosed with S. agalactiae infection (0.088%), and a total of 54 strains of S. agalactiae were isolated. Both pregnant women and infant strains of S. agalactiae showed high resistance rates to tetracycline (85.47%, 83.33%), erythromycin (69.22%, 75.93%), and clindamycin (50.09%, 72.22%), but the resistance rates to levofloxacin were relatively low (17.78%, 3.70%), while they were sensitive to penicillin and other antibacterial drugs. The main clinical manifestations of the 43 children with S. agalactiae infection included pneumonia, respiratory distress syndrome, shock, sepsis, and hyperbilirubinemia. Their mortality rate was 23.26%, and there was no statistically significant difference in the mortality rate between early-onset infections (29.63%, 8/27) and late-onset infections (12.50%, 2/16) (P>0.05). Conclusion The detection rate of S. agalactiae in women during late-pregnancy is relatively high, and the combined detection using anal swabs and vaginal swabs can improve the detection rate of S. agalactiae. Both pregnant women and infant strains show high resistance to tetracycline, erythromycin, and clindamycin, but remain sensitive to penicillin, the first-choice prophylactic agent. Given that colonization of S. agalactiae in late pregnancy may increase the risk of adverse outcomes in infants, standardized screening and intrapartum antibiotic prophylaxis are recommended to reduce the probability of mother-to-child transmission.