To compare the prophylactic efficacy of ampicillin and clindamycin against vertical transmission of group B Streptococcus from mothers to their infants by evaluating the rates of group B Streptococcus colonisation. We retrospectively extracted data for mothers who delivered at Showa University Northern Yokohama Hospital between 1 October 2017 and 31 March 2021 and tested positive for antepartum group B Streptococcus, and their infants. The chi-square test was used to compare the rates of group B Streptococcus colonisation, sepsis, and meningitis. We conducted a multivariate logistic regression analysis, including the time interval between membrane rupture and delivery, chorioamnionitis, and maternal intrapartum fever (≥38.0°C). Two hundred fifty-nine mothers and their infants were eligible. Ampicillin and clindamycin were administered to 150 and 109 mothers, respectively. In the ampicillin and clindamycin groups, 12.0% (18/150) and 37.6% (41/109) infants were group B Streptococcus positive, respectively. The rate of group B Streptococcus colonisation among infants was significantly lower in the ampicillin group (p < 0.001). Multivariate regression analysis showed similar results (p < 0.001). No sepsis or meningitis cases were observed in either group. Prophylactic efficacy of clindamycin against the vertical transmission of group B Streptococcus is lower than that of ampicillin.