An N-alkyl tryptanthrin derivative, a preparation method for same, and an application thereof are provided. The structure of the derivative is as represented by formula I. The N-alkyl tryptanthrin derivative can serve as a highly active IDO inhibitor, for use in preparing a medicament for prevention and/or treatment of a disease having a pathological characteristic of an IDO-mediated tryptophan metabolic pathway.