Understanding cell state transitions and purposefully controlling them to improve therapies is a longstanding challenge in biological research and medicine. Here, we identify a transcriptional signature that distinguishes activated macrophages from the tuberculosis (TB) susceptible and resistant mice. We then apply the cSTAR (cell state transition assessment and regulation) approach to data from screening-by-RNA sequencing to identify chemical perturbations that shift the transcriptional state of tumor necrosis factor (TNF)-activated TB-susceptible macrophages toward that of TB-resistant cells, i.e., prevents their aberrant activation without suppressing beneficial TNF responses. Last, we demonstrate that the compounds identified with this approach enhance the resistance of the TB-susceptible mouse macrophages to virulent Mycobacterium tuberculosis.