Shaofu Zhuyu decoction is a famous formula for treating primary dysmenorrhea in China since the Qing dynasty. In this paper, the inhibitory effects of active-guided fraction and its main bioactive components of Shaofu Zhuyu decoction on a model of non-pregnant mice uterine contraction induced by oxytocin in vitro were investigated. Qualitative and quantitative chemical analyses were used to correlate the chemical composition of active fraction with the spasmolytic effects. Seven ingredients in the active fraction were identified and quantified by HPLC-DAD. Three ingredients, ferulic acid, vanillic acid, and typhaneoside, were evaluated for their effects on mice isolated uterine contraction induced by oxytocin in vitro. The ED(50) of them were 63.0 microg/ml, 57.6 microg/ml, 109.7 microg/ml, respectively. Furthermore, the inhibitory activity of the combination of these three compounds was prior to the fraction and seven compounds group. The ED(50) was 65.5 microg/ml. The data stated that ferulic acid, vanillic acid, and typhaneoside were possibly the main active components in the bioactive fraction of Shaofu Zhuyu decoction. The study also implied that Shaofu Zhuyu decoction may have direct inhibitory effects on the contractility of the mice uterus and justified the traditional use of the prescription for treating the uterine cramping associated dysmenorrhea.