Most of the malignant melanomas are already in the middle and advanced stages when they are diagnosed, which is often accompanied by the metastasis and spread of other organs.Besides, the prognosis of patients is bleak. The characteristics of the local immune microenvironment in metastatic melanoma have important implications for both tumor progression and tumor treatment. In this study, data on patients with metastatic melanoma from the TCGA and GEO datasets were selected for immune, stromal, and estimate scores, and overlapping differentially expressed genes (DEGs) were screened. A nine-IRGs prognostic model (ALOX5AP, ARHGAP15, CCL8, FCER1G, GBP4, HCK, MMP9, RARRES2 and TRIM22) was established by univariate COX regression, LASSO and multivariate COX regression. Receiver operating characteristic (ROC) curves were used to test the predictive accuracy of the model. Immune infiltration was analyzed by using CIBERSORT, Xcell and ssGSEA in high-risk and low-risk groups. The immune infiltration of the high-risk group was significantly lower than that of the low-risk group. Immune checkpoint analysis revealed that the expression of PDCD1, CTLA4, TIGIT, CD274, HAVR2 and LAG3 were significantly different in groups with different levels of risk scores. WGCNA analysis found that the yellow-green module contained seven genes (ALOX5AP, FCER1G, GBP4, HCK, MMP9, RARRES2 and TRIM22) from the nine-IRG prognostic model, of which the yellow-green module had the highest correlation with risk scores. The results of GO and KEGG suggested that the genes in the yellow-green module were mainly enriched in immune-related biological processes. Finally, we analyzed the prognostic ability and expression characteristics of ALOX5AP, ARHGAP15, CCL8, FCER1G, GBP4, HCK, MMP9, RARRES2 and TRIM22 in metastatic melanoma. Overall, a prognostic model for metastatic melanoma based on the characteristics of the tumor immune microenvironment was established, which was helpful for further studies.It could function well in helping people to understand the characteristics of the immune microenvironment in metastatic melanoma and to find possible therapeutic targets.