To construct a universal vaccine against mastitis induced by either Streptococcus agalactiae or Staphylococcus aureus, the B cell epitopes of the surface immunogenic protein (Sip) from S. agalactiae and clumping factor A (ClfA) from S. aureus were analyzed and predicted. sip-clfA, a novel chimeric B cell epitope-based gene, was obtained by overlap PCR, and then the recombinant Sip-ClfA (rSip-ClfA) was expressed and purified. rSip-ClfA and inactivated S. agalactiae and S. aureus were formulated into different vaccines with mineral oil as the adjuvant and evaluated in mouse models. The rSip-ClfA vaccination induced immunoglobulin G (IgG) titers higher than those seen in groups immunized with inactivated bacteria. Furthermore, the response to rSip-ClfA immunization was characterized as having a dominant IgG1 subtype, whereas both bacterial immunizations produced similar levels of IgG1 and IgG2a. The antiserum capacities for opsonizing adhesion and phagocytosis were significantly greater in the rSip-ClfA immunization group than in the killed-bacterium immunization groups (P < 0.05). The immunized lactating mice were challenged with either S. agalactiae or S. aureus via the intramammary route. At 24 h postinfection, the numbers of bacteria recovered from the mammary glands in the rSip-ClfA group were >5-fold lower than those in both inactivated-bacterium groups (P < 0.01). Histopathological examination of the mammary glands showed that rSip-ClfA immunization provided better protection of mammary gland tissue integrity against both S. agalactiae and S. aureus challenges. Thus, the recombinant protein rSip-ClfA would be a promising vaccine candidate against mastitis induced by either S. agalactiae or S. aureus.