The present application relates to the compound of formula (I), or a pharmaceutically acceptable salt and pharmaceutical composition thereof, the compound of formula (I) or the pharmaceutically acceptable salt and pharmaceutical composition thereof having indole-2, 3-dioxygenase (IDO) inhibitory activity, and being able to treat immunosuppressive diseases mediated by indole-2, 3-dioxygenase (IDO), such as infectious diseases or cancer.本發明涉及通式I和通式II的化合物或其藥學上可接受的鹽及其藥物組合物,該通式I和通式II的化合物或其藥學上可接受的鹽及其藥物組合物具有吲哚2,3-雙加氧酶(IDO)抑制活性,能治療由吲哚2,3-雙加氧酶(IDO)介導的免疫抑制疾病,如傳染性疾病或癌症。