Use of albiflorin or a pharmaceutically acceptable salt thereof as an IDO inhibitor. Albiflorin or a pharmaceutically acceptable salt thereof as an IDO inhibitor can be used for the preparation of a drug, a food, a health care product, a food additive or a nutritional supplement for the prevention or treatment of diseases having a pathological feature involving tryptophan metabolic pathway mediated by overactivation of IDO, and these diseases are selected from one or more of cancer, depression, Alzheimer's disease, and Parkinson's disease.