The invention belongs to the field of chemical medicine, and particularly relates to a small molecule compound having an IDO1 / TDO double target, wherein the general formula is defined in the specification. According to the present invention, the embodiment schemes prove that the small molecule compound can simultaneously inhibit two enzymes IDO1 and TDO so as to reduce the immune evasion of tumorcells, achieve self-cure of tumor diseases, achieve good medicinal potential and provides new potential choice for clinical medication; the preparation method has characteristics of simpleness, mild reaction condition, convenient operation, convenient control, low energy consumption, high yield and low cost, and is suitable for industrial production; and the prepared compound has advantages of high biological activity, strong selectivity to tumor cells, remarkable drug-like properties, and good application prospects in the pharmaceutical industry.