Background: Cutaneous malignant melanoma (CMM) is among the most lethal cancers. The tumour microenvironment (TME) is closely linked with tumorigenesis, metastasis, and prognosis.Methods: We employed the ESTIMATE algorithm to calculate immune and stromal scores of malignant melanoma tissues from the Cancer Genome Atlas dataset, respectively, and determine core prognosis gene signature examined by COX proportional hazards model. Functional enrichment annotation, the Kyoto Encyclopedia of Genes and Genomes pathways, the Protein-Protein Interaction network, Weighted Gene Co-expression Network Analysis and overall survival analysis were used to formulate potential function of these genes that involved in immune-linked biological processes. CIBERSORT algorithm was used to estimate the abundances of immune cell types in CMM samples. Finally, the OncoLnc platform, the Gene Expression Profiling Interactive Analysis resources, and the Human Protein Atlas database were applied to validate our results. Results:908 differential expressed genes and ten hub genes were screened, and GO annotation indicated that immune response and inflammatory response were firmly involved in CMM tumorigenesis and progression. CD247, identified as the most significant prognostic biomarker, highly expressed in tumor samples and possessed a better prognosis than low expressed samples. The correlation analysis of immune cells infiltration unveiled that CD8+ T cell and Macrophages were intense significant to CMM patients' prognosis. Survival analysis suggested that ten hub genes and infiltrated immune cells are linked to the prognosis of CMM. ConnectiveMap analysis strongly indicated that L-securinine may be a promising candidate medicine for CMM patients.Conclusions: we deeply analyzed the immune-linked genes with the tumour microenvironment, and labeled CD247 as the most intriguing prognostic biomarker for CMM, which may bring better clinical outcomes for CMM patients.