Immune exclusion and evasion are central barriers to the success of immunotherapies and cell therapies in solid tumors. Here we applied single cell spatial and perturbational transcriptomics alongside clinical, histological, and genomic profiling to elucidate immune exclusion and evasion in high-grade serous tubo-ovarian cancer (HGSC). Using high-plex spatial transcriptomics we profiled more than 1.3 million cells from 95 tumors and 60 patients, revealing generalizable principles in HGSC tumor tissue organization. Our data demonstrates that effector T cells resist stroma-mediated trapping and sequestration. However, upon infiltration into the tumor, T cells, as well as Natural Killer (NK) cells, preferentially co-localize only with a subset of malignant cells that manifest a distinct transcriptional cell state. The latter consists of dozens of co-regulated genes and is repressed under various copy number alterations. Performing CRISPR Perturb-seq screens in ovarian cancer cells, we identified functionally diverse genetic perturbations - including knockout of the insulin sensing repressor PTPN1 and the epigenetic regulator ACTR8 - that de-repress the proposed immunogenic malignant cell state identified in patients and indeed sensitize ovarian cancer cells to T cell and NK cell cytotoxicity. Taken together, our study uncovered a profound connection between somatic genetic aberrations, malignant cell transcriptional dysregulation, and immune evasion at the cellular and tissue level, allowing us to identify targets that reprogram malignant cell states as an avenue to unleash anti-tumor immune responses.