Yiru Tiaojing Granule, a traditional Chinese medicine formula, is used to treat hyperprolactinemia. This study was conducted to evaluate the mechanism of action and pharmacological activity of Yiru Tiaojing Granule on prolactin secretion. The animal model of hyperprolactinemia was induced by metoclopramide. The dopamine D2 receptor in hyperprolactinemia rat models was analyzed by immunohistochemistry. The biochemical parameters, including a follicle-stimulating hormone, luteinizing hormone, estradiol, progesterone, testosterone, and prolactin, were measured by an enzyme-linked immunosorbent assay. Furthermore, the expression of prolactin and the dopamine D2 receptor was analyzed by Western blotting. The components in the Yiru Tiaojing Granule-medicated serum were assayed by liquid chromatography-tandem mass spectrometry. The Yiru Tiaojing Granule significantly decreased the prolactin level in the hyperprolactinemia rat model, and increased the estradiol, luteinizing hormone, and progesterone levels. The high and medium doses of Yiru Tiaojing Granule reduced dopamine D2 receptor expression in the brain (p < 0.001) and produced a similar effect on bromocriptine (p < 0.001). Yiru Tiaojing Granule-medicated serum reduced (p < 0.001) prolactin expression in MMQ cells in a concentration-dependent manner, but had no effects on GH3 cells. The level of the dopamine D2 receptor in MMQ cells was also increased dose-dependently (p < 0.05). In addition, the protein kinase A and cyclic adenosine monophosphate in MMQ cells were significantly attenuated dose-dependently by treatment with a high and medium dose of Yiru Tiaojing Granule-medicated serum (p < 0.05) and bromocriptine-medicated serum (p < 0.01). The results suggested that Yiru Tiaojing Granule was effective against hyperprolactinemia, and the activation of the dopamine D2 receptor, which was related to the second messenger cyclic adenosine monophosphate and protein kinase A, might be the potential mechanism.