The invention relates to an application of limonoids in preparation of medicine for treating autoimmune diseases, wherein the limonoids include a structure represented as the formula (I), wherein R isoptionally selected from hydroxylated alkyl groups. The invention further relates to an application of the limonoids in preparation of a medicine for inhibiting differentiation of T-helper cell 17, and an application of the limonoids in preparation of a medicine for inhibiting differentiation of T-helper cell 1, T-helper cel 2 or regulative T cells. A method of screening substances capable of inhibiting cells of one or more of Th17, Th1, Th2 and Treg, which can be used for treating the autoimmune diseases. The limonoids can inhibit the differentiation of the Th17, Th1, Th2 and / or Treg cells.