Indoleamine 2,3-dioxygenase 1 (IDO1) has attracted much attention in the field of cancer immunotherapy as an immunomodulatory enzyme. To identify potential IDO1 inhibitors, a novel series of compounds with N,N-diphenylurea and triazole structures were synthesized. The designed compounds underwent organic synthesis, and subsequent enzymatic activity experiments targeting IDO1 confirmed their activity at the molecular level. These experiments provided validation for the efficacy of the designed compounds in inhibiting IDO1, compound3gexhibited an IC50value of 1.73 ± 0.97 μM. Further molecular docking study further explained the binding mode and reaction potential of compound3gwith IDO1. Our research has resulted in a series of novel IDO1 inhibitors, which is beneficial to the development of drugs targeting IDO1 in numerous cancer diseases.