The same types of cells can assume diverse states with varying functionalities. Effective cell therapy can be achieved by specifically driving a desirable cell state, which requires the elucidation of key transcription factors (TFs). Here, we integrated epigenomic and transcriptomic data at the systems level to identify TFs that define different CD8+ T cell states in an unbiased manner. These TF profiles can be used for cell state programming that aims to maximize the therapeutic potential of T cells. For example, T cells can be programmed to avoid a terminal exhaustion state (TexTerm), a dysfunctional T cell state that is often found in tumors or chronic infections. However, TexTerm exhibits high similarity with the beneficial tissue-resident memory T states (TRM) in terms of their locations and transcription profiles. Our bioinformatic analysis predicted Zscan20, a novel TF, to be uniquely active in TexTerm. Consistently, Zscan20 knock-out thwarted the differentiation of TexTerm in vivo, but not that of TRM. Furthermore, perturbation of Zscan20 programs T cells into an effector-like state that confers superior tumor and virus control and synergizes with immune checkpoint therapy. We also identified Jdp2 and Nfil3 as powerful TexTerm drivers. In short, our multiomics-based approach discovered novel TFs that enhance anti-tumor immunity, and enable highly effective cell state programming.