Our results reveal that key genes of the identified IMS are related to hallmark activities of cancer-associated fibroblasts (CAFs), macrophages and epithelial to mesenchymal transition (EMT), and the balance between the IFN-γ signature and the IMS plays an important predictive role in both immunotherapy-naive primary tumors from The Cancer Genome Atlas (TCGA) database and ICI-treated patients. This evidence concerns the gene IFNG and cancer.