Strategies for tackling cancer involve surgery, radiotherapy, chemotherapy, and immune checkpoint inhibitors (ICB). However, the effectiveness of ICB remains constrained, prompting the need for a proactive strategy to foresee treatment responses and resistances. This study undertook an analysis across diverse cancer patient cohorts (including melanoma, clear cell renal carcinoma, glioblastoma, bladder, and stomach cancers) subjected to various immune checkpoint blockade treatments. Surprisingly, our findings unveiled that over 38% of patients demonstrated resistance and persistent disease progression despite undergoing ICB intervention. To unravel the intricacies of resistance, we scrutinized the immune profiles of cancer patients experiencing ongoing disease progression and resistance post-ICB therapy. These profiles delineated multifaceted defects, including compromised macrophage, monocyte, and T cell responses, impaired antigen presentation, aberrant regulatory T cell (Tregs) responses, and an elevated expression of immunosuppressive and G protein-coupled receptor molecules (TGFB1, IL2RA, IL1B, EDNRB, ADORA2A, SELP, and CD276). Building upon these insights into resistance profiles, we harnessed machine learning algorithms to construct models predicting the response and resistance to ICB and developed the accompanying software. While previous work on glioblastoma with only one type of algorithm had an accuracy of 0.82, we managed to develop 20 models that provided estimates of future events of resistance or response in five cancer types, with accuracies ranging between 0.79 and 1, based on their distinct immune characteristics. In conclusion, our approach advocates for the personalized application of immunotherapy in cancer patients based on patient-specific attributes and computational models.