RNA methylation normally inhibits self-recognition and immunogenicity of RNA. As such, it is likely an important inhibitor of cancer immune recognition in the tumor microenvironment (TME), but how N6-methyladenosine (m6A) affects prognosis and treatment response remains unknown. In eight independent melanoma cohorts (1564 patients), the modification patterns of 21 m6A gene signatures were systematically correlated with the immune cell infiltration of melanoma TME. m6A modification patterns for each patient were quantified using the principal component analysis (PCA) method, yielding an m6Ascore that reflects the abundance of m6A RNA modifications. Two different m6A modification patterns were observed in melanoma patients, separated into high and low m6Ascores that correlated with survival and treatment response. Low m6Ascores were characterized by an immune-inflamed phenotype, with 61.1% five-year survival. High m6Ascores were characterized by an immune-excluded phenotype, with 52.2% five-year survival. Importantly, lower m6Ascores correlated with more sensitive anti-PD1 and anti-CTLA4 treatment responses, with 90% of patients with low m6Ascore responding while 10% of those with high m6Ascore non-responding (in cohort GSE63557). At single-cell and spatial transcriptome resolution, m6Ascore reflects melanoma malignant progression, immune exhaustion, and resistance to ICB therapy. Hence, the m6Ascore correlates to an important facet of tumor immune escape as a tool for personalized medicine to guide immunotherapy in melanoma patients.Copyright © 2023 The Authors. Published by Elsevier Inc. All rights reserved.