A pharmaceutical composition with an immunomodulating function is provided, including an extract of Bupleurum obtained by grinding the Bupleurum , adding the ground Bupleurum to a solvent and isolating the extract from the solvent, wherein the Bupleurum comprises Bupleurum krlovianum, Bupleurum longiradiatum, Bupleurum smithii, Bupleurum pusillum, Bupleurum longicaule, Bupleurum salicifolium, Bupleurum scorzonerifolium and Bupleurums with at least one of the nucleotide sequences selected from a group consisting of SEQ ID NOs. 1~6 and a nucleotide sequence with no more than 1% of the nucleotide sequence divergences of SEQ ID NOs. 1-6, or combinations thereof.