The present invention relates to a class of fused imidazole compounds, their preparation and use. The compounds have a structure shown in general formula I, wherein each group is as defined in the specification. These compounds are able to selectively inhibit indoleamine 2,3-dioxygenase (IDO). The compounds of the present invention are useful as IDO inhibitors in the treatment and/or prevention of diseases with pathological features of the IDO-mediated tryptophan metabolic pathway such as cancer, ocular diseases, autoimmune diseases, mental disorders, depression, anxiety and other diseases.本發明涉及一類稠合咪唑化合物、其製備方法及其應用。所述化合物的結構如通式I所示,其中各基團的定義如說明書所述。這些化合物能夠選擇性地抑制吲哚胺2,3-雙加氧酶(IDO)。本發明化合物可作為IDO抑制劑用於治療和/或預防具有IDO介導的色胺酸代謝途徑的病理學特徵的疾病,例如癌症、眼部疾病、自身免疫性疾病、心理障礙、抑鬱症、焦慮症及其它疾病。