Disclosed are uses of a Pulsatilla saponin compound B4 represented by formula (I) or a pharmaceutically acceptable salt thereof in preparing a drug for treating viral and/or bacterial diseases, such as bovine mastitis, said Pulsatilla saponin compound B4 represented by formula (I) or a pharmaceutically acceptable salt thereof being an active ingredient.