Discovering novel small molecules for cancer immunotherapy represents a promising but challenging strategy in future cancer treatment. Herein, we designed the first theranostic fluorescent probes to efficiently detect and inhibit the enzymatic activity of 2,3-dioxygenase 1 (IDO1). Probe 6b is a highly active IDO1 inhibitor (IC