Background Primary melanoma ulceration is an unfavourable prognostic factor included in current staging systems.Yet, the immunological and molecular alterations responsible for this adverse outcome have not been fully elucidated.Objectives We aimed to identify immunological differences between ulcerated and non-ulcerated primary melanomas concerning both innate and adaptive immunity and to correlate these with clinical outcome.Methods Formalin-fixed paraffin-embedded primary melanomas from 112 patients (pts) were analysed by immunohistochemistry. The expression of various markers identifying tumour-infiltrating lymphocytes, macrophages and dendritic cells was evaluated semi-quantitatively by three independent investigators. Tumour cell expression of programmed death-ligand 1 (PD-L1), transporter of antigen processing 1 and the MxA protein was also analysed.Results Recurrence occurred in 21/56 pts (37.5%) with ulcerated vs. 14/56 pts (25.0%) with non-ulcerated tumours (P = 0.15). Tumour ulceration was associated with more frequent development of brain metastasis (17.6 vs. 3.6% of pts, P = 0.015). Immunohistochemistry showed an association of ulceration with the presence of intratumoural CD68 + macrophages (P = 0.028) as well as with increased numbers of intratumoural CD11c + dendritic cells (P = 0.014) and CD163 + macrophages (P = 0.001). PD-L1 positivity (expression in >1% of tumour cells) was more frequent in ulcerated than non-ulcerated tumours [40 (72.7%) vs. 25 (44.6%), P = 0.003]. A positive correlation between intratumoural CD11c + (Spearman's correlation coefficient q: 0.42) and CD163 + (q: 0.31) cell count and frequency of tumour cell PD-L1 expression was detected.Conclusions Our results confirm the adverse clinical outcome associated with primary melanoma ulceration, particularly concerning the risk of recurrence and subsequent development of brain metastases. The observed immunological differences suggest a conceivable role of increased intratumoural macrophage and dendritic cell counts associated with enhanced tumour cell PD-L1 expression potentially contributing to the immunosuppressive, growth-promoting microenvironment of ulcerated primary melanomas.