Background: Melanoma was a severely life-threatening malignancy. Immunity was known to associate with tumor. Exploring an immune biomarker would took advantage of the diagnosis of melanoma and then overcome it. Methods: We downloaded melanoma samples from the GEO and TCGA. The immune-related genes (IRGs) source came from the ImmPort database. An immune-related classifier for melanoma prognosis was conducted by using WGCNA, Cox regression analysis and LASSO analysis. To explored the different overall survival between high and low risk group, we used ESTIMATE and CIBERSORT algorithms to explore the tumor microenvironment and analyze immune infiltration of melanoma. GSEA analysis was performed to study the differences in signaling pathways. Findings: 63 IRGs were concerned to be involved in survival. Eight IRGs were adopted to construct a classifier. The multi-IRGs classifier showed a powerful predictive abilitity. Patients with high risk score held poor survival. Compared with current clinical data, the AUC of 3 years and 5 years suggested that the classifier had better predictive power. Differences overall survival of high and low RS group based the classifier might be caused by the diffences of immune infiltration, tumor microenvironmentm and multiple signaling pathways. Interpertation: The IRGs classifier exhibited strong predictive power in melanoma. The survival difference among the high and low RS group was associated with tumor microenvironment of melanoma and multiple signaling pathways. These achievements can provide guiding values for further analysis of melanoma pathogenesis and clinical treatment. Funding Statement: This work was supported by the fund of Guangxi natural science foundation(2016JB140086). Declaration of Interests: There were no conflicts of interest of any authors in relation to the submission. Ethics Approval Statement: Ethical approval was waived as the authors used only publicly available data and materials in this study.