Mitochondrial uncoupling protein 2 (UCP2) plays a crucial role in regulating oxidative stress and cellular metabolism, positioning it as an important subject in oncological research. The involvement of UCP2 in cancer is complex and context-dependent, suggesting it as a potential therapeutic target. In this study, we aimed to perform a comprehensive pan-cancer analysis of UCP2, with a particular focus on gender-related malignancies such as breast (BRCA), prostate (PRAD), ovarian (OV), and testicular tumors (TGCT). We analyzed UCP2 expression in The Cancer Genome Atlas (TCGA), examining correlations with prognosis, tumor mutational burden (TMB), microsatellite instability (MSI), immune cell infiltration, immune checkpoint genes, genes involved in steroidogenesis, sex hormone receptor genes, and drug sensitivity. Significant variability in UCP2 expression was observed across cancer types. UCP2 levels were elevated in BRCA and OV but reduced in PRAD and TGCT. High UCP2 expression was associated with a better prognosis in OV and poorer overall survival in PRAD. Furthermore, UCP2 correlated with TMB and MSI in OV, TGCT, and BRCA. UCP2 expression was also linked to immune cell infiltration, immune checkpoint genes, steroidogenic genes, and sex hormone receptor genes, with variable effects depending on cancer type and gender. Additionally, UCP2 also demonstrated sensitivity to specific anticancer drugs. Our findings highlight the interplay between UCP2, immune and hormonal pathways, and drug responseand reveal potential opportunities for new therapeutic combinations, especially in gender-related cancers.