The invention provides the application of berberine in the preparation of medicines for preventing and treating rheumatoid arthritis. The invention adopts the berberine to carry out the animal efficacy test, and the result shows that the berberine can inhibit the clinical onset of collagen-induced arthritis, and obviously inhibit the severity and incidence rate of the onset. And can down-regulate tumor necrosis factor α, interleukin 17, interferon γ in spleen cell supernatant, inhibit the secretion of pro-inflammatory cytokines TNF-α, IFN-γ and IL-17, so as to prepare drugs for preventing and treating rheumatoid arthritis, It has great clinical application value. The medicine is a pharmaceutical composition made of berberine as an active ingredient and conventional pharmaceutical excipients, including tablets, dispersible tablets, buccal tablets, orally disintegrating tablets, sustained-release tablets, capsules, soft capsules, dropping pills, Granules, injections, powder injections or aerosols.