In the present study, we aimed to investigate immune-related signatures and immune infiltration in melanoma. The transcriptome profiling and clinical data of melanoma were downloaded from The Cancer Genome Atlas database, and their matched normal samples were obtained from the Genotype-Tissue Expression database. After merging the genome expression data using Perl, the limma package was used for data normalization. We screened the differentially expressed genes (DEGs) and obtained immune signatures associated with melanoma by an immune-related signature list from the InnateDB database. Univariate Cox regression analysis was used to identify potential prognostic immune genes, and LASSO analysis was used to identify the hub genes. Next, based on the results of multivariate Cox regression analysis, we constructed a risk model for melanoma. We investigated the correlation between risk score and clinical characteristics and overall survival (OS) of patients. Based on the TIMER database, the association between selected immune signatures and immune cell distribution was evaluated. Next, the Wilcoxon rank-sum test was performed using CIBERSORT, which confirmed the differential distribution of immune-infiltrating cells between different risk groups. We obtained a list of 91 differentially expressed immune-related signatures. Functional enrichment analysis indicated that these immune-related DEGs participated in several areas of immune-related crosstalk, including cytokine-cytokine receptor interactions, JAK–STAT signaling pathway, chemokine signaling pathway, and Th17 cell differentiation pathway. A risk model was established based on multivariate Cox analysis results, and Kaplan-Meier analysis was performed. The Kruskal-Wallis test suggested that a high risk score indicated a poorer OS and correlated with higher American Joint Committee on Cancer-TNM (AJCC-TNM) stages and advanced pathological stages (
P
<
0.01
). Furthermore, the association between hub immune signatures and immune cell distribution was evaluated in specific tumor samples. The Wilcoxon rank-sum test was used to estimate immune infiltration density in the two groups, and results showed that the high-risk group exhibited a lower infiltration density, and the dominant immune cells included M0 macrophages (
P
=
0.023
) and activated mast cells (
P
=
0.005
).