Despite robust evidence for the role of m6A in cancer development and progression, its association with immune infiltration and survival outcomes in melanoma remains obscure. Here, we aimed to develop an m6A-related risk signature to improve prognostic and immunotherapy responder prediction performance in the context of melanoma. We comprehensively analyzed the m6A cluster and immune infiltration phenotypes of public datasets. The TCGA (n = 457) and eleven independent melanoma cohorts (n = 758) were used as the training and validation datasets, respectively. We identified two m6A clusters (m6A-clusterA and m6A-clusterB) based on the expression pattern of m6A regulators via unsupervised consensus clustering. IGF2BP1 (7.49%), KIAA1429 (7.06%), and YTHDC1 (4.28%) were the three most frequently mutated genes. There was a correlation between driver genes mutation statuses and the expression of m6A regulators. A significant difference in tumor-associated immune infiltration between two m6A clusters was detected. Compared with m6A-clusterA, the m6A-clusterB was characterized by a lower immune score and immune cell infiltration but higher mRNA expression-based stemness index (mRNAsi). An m6A-related risk signature consisting of 12 genes was determined via Cox regression analysis and divided the patients into low- and high-risk groups (IL6ST, MBNL1, NXT2, EIF2A, CSGALNACT1, C11orf58, CD14, SPI1, NCCRP1, BOK, CD74, PAEP). A nomogram was developed for the prediction of the survival rate. Compared with the high-risk group, the low-risk group was characterized by high expression of immune checkpoints and immunophenoscore (IPS), activation of immune-related pathways, and more enriched in immune cell infiltrations. The low-risk group had a favorable prognosis and contained the potential beneficiaries of the immune checkpoint blockade therapy and verified by the IMvigor210 cohort (n = 298). The m6A-related signature we have determined in melanoma highlights the relationships between m6A regulators and immune cell infiltration. The established risk signature was identified as a promising clinical biomarker of melanoma.