The invention relates to an indoleamine2,3-dioxygenase inhibitor having a structure as shown in a formula (I), as well as a preparation method and application thereof. The IDO inhibitor is (Z)-N'-hydroxyl-N-benzoate derivative, has high inhibiting activity for IDO, can be used for effectively inhibiting the IDO activity and inhibiting immunosuppression of patients, can be widely applied to treatment or prevention of cancer or tumors, virus infection, depression, neural degeneration disease, trauma, age related cataract, organ transplant rejection or autoimmune disease, and is expected to be developed into a new generation of immunosuppressors.