Background: Immunotherapy for upper tract urothelial carcinoma (UTUC) shows potential, but only a small subset of patients benefits from the treatment. This disadvantage can be attributed to additional immunosuppressive mechanisms in vivo. Indoleamine 2,3-dioxygenase 1 (IDO1) can be potentially used as an immune checkpoint target. We conducted this study to determine the prognostic role of IDO1 in UTUC and further construct an immune classifier, which can provide additional prognostic information and personalized treatment for UTUC. Methods: Two hundred and fifty-one tumor tissues of UTUC from three independent cohorts were analyzed. The expression of IDO1, programmed cell death protein 1-ligand 1 (PD-L1) and the infiltration of CD4+/CD8+/Foxp3+ T cells were evaluated using immunohistochemistry staining. Kaplan-Meier curves and Cox model were used for comparing the clinical outcomes. The Lasso Cox regression model was used to construct an IDO1-based immune classifier. Internal and external validation cohorts were included to validate the classifier. The immune contexture of different risk group stratified by the immune classifier were measured by RNA sequencing and immunofluorescence. Results: High IDO1 expression on tumor cells (TC) indicated a poorer overall survival and disease-free survival compared with low IDO1 expression in all cohorts. Patients with high expression of IDO1 TC possessed increased infiltration of Foxp3+ regulatory cells, CD8+ and CD4+ T cells. However, the distribution of IDO1 expression was irrelevant with that of PD-L1. An immune classifier based on intratumoral CD8+ lymphocytes, IDO1 TC and stromal PD-L1 expression status was developed, with its AUC values for OS at 5 years being 0.79 (95% CI 0.65-0.93) in the discovery cohort, 0.75 (95% CI 0.58-0.92) and 0.78 (95% CI 0.65-0.92) in the internal and external validation cohort, respectively. Moreover, the high-risk group stratified by our immune classifier was associated with immunosuppressive contexture, accompanied by enhanced CD8+ T cells exhaustion patterns. Conclusion: Our IDO1-based immune classifier can provide a superior accuracy for survival prediction and lead to individual stratification of UTUC immune subtypes. Funding: This study was supported by the National Natural Science Foundation of China (grant no. 81825016, 81902586); Guangdong Provincial Natural Science Foundation (grant no. 2021A1515011541); Guangdong Provincial Clinical Research Center for Urological Diseases (grant no. 2020B1111170006); Key Laboratory of Malignant Tumor Gene Regulation and Target Therapy of Guangdong Higher Education Institutes (grant no. KLB09001); Key Laboratory of Malignant Tumor Molecular Mechanism and Translational Medicine of Guangzhou Bureau of Science and Information Technology (grant no. 013-163); Key Laboratory of Tumor Immunoprevention Research of Yunnan Province (grant no. 2017DG004-04); The Health Science and Technology Talents Training and “Ten, Hundred and Thousand” Project of Kunming (grant no. 2018-sw-004); Yunnan Basic Research Program- Kunming Medical University Joint Project (grant no. 2018FE001-090). Declaration of Interest: None to declare. Ethical Approval: The study was approved by the ethics committee of Sun Yat-sen Memorial Hospital and Peking University First Hospital.