Early diagnosis of melanoma is critical for improved survival. However, the biomarkers of early melanoma evolution and their origin within the tumor and its microenvironment, including the keratinocytes, are poorly defined. To address this, we used spatial transcript profiling that maintains the morphological tumor context to measure the expression of >1,000 RNAs in situ in patient-derived formalin-fixed, paraffin-embedded tissue sections in primary melanoma and melanocytic nevi. We profiled 134 regions of interest (each 200 μm in diameter) enriched in melanocytes, neighboring keratinocytes, or immune cells. This approach captured distinct expression patterns across cell types and tumor types during melanoma development. Unexpectedly, we discovered that S100A8 is expressed by keratinocytes within the tumor microenvironment during melanoma growth. Immunohistochemistry of 252 tumors showed prominent keratinocyte-derived S100A8 expression in melanoma but not in benign tumors and confirmed the same pattern for S100A8's binding partner S100A9, suggesting that injury to the epidermis may be an early and readily detectable indicator of melanoma development. Together, our results establish a framework for high-plex, spatial, and cell type‒specific resolution of gene expression in archival tissue applicable to the development of biomarkers and characterization of tumor microenvironment interactions in tumor evolution.