Melanoma clinical outcomes emerge from incompletely understood genetic mechanisms operating within the tumor and its microenvironment. Here, we used single-cell RNA-based spatial molecular imaging (RNA-SMI) in patient-derived archival tumors to reveal clinically relevant markers of malignancy progression and prognosis. We examined spatial gene expression of 203,472 cells inside benign and malignant melanocytic neoplasms, including melanocytic nevi and primary invasive and metastatic melanomas. Algorithmic cell clustering paired with intratumoral comparative two-dimensional analyses visualized synergistic, spatial gene signatures linking cellular proliferation, metabolism, and malignancy, validated by protein expression. Metastatic niches included up-regulation of
CDK2
and
FABP5
, which independently predicted poor clinical outcome in 473 patients with melanoma via Cox regression analysis. More generally, our work demonstrates a framework for applying single-cell RNA-SMI technology toward identifying gene regulatory landscapes pertinent to cancer progression and patient survival.