Macrophages play critical, but opposite, roles in acute and chronic inflammation and cancer. In response to pathogens or injury, inflammatory macrophages express cytokines that stimulate cytotoxic T cells, whereas macrophages in neoplastic and parasitic diseases express anti-inflammatory cytokines that induce immune suppression and may promote resistance to T cell checkpoint inhibitors. Here we show that macrophage PI 3-kinase γ controls a critical switch between immune stimulation and suppression during inflammation and cancer. PI3Kγ signalling through Akt and mTor inhibits NFκB activation while stimulating C/EBPβ activation, thereby inducing a transcriptional program that promotes immune suppression during inflammation and tumour growth. By contrast, selective inactivation of macrophage PI3Kγ stimulates and prolongs NFκB activation and inhibits C/EBPβ activation, thus promoting an immunostimulatory transcriptional program that restores CD8+ T cell activation and cytotoxicity. PI3Kγ synergizes with checkpoint inhibitor therapy to promote tumour regression and increased survival in mouse models of cancer. In addition, PI3Kγ-directed, anti-inflammatory gene expression can predict survival probability in cancer patients. Our work thus demonstrates that therapeutic targeting of intracellular signalling pathways that regulate the switch between macrophage polarization states can control immune suppression in cancer and other disorders.