BRAF inhibitors (BRAFi) improve survival in metastatic melanoma patients (MMP) but the duration of clinical benefit is limited by development of drug resistance. Here, we investigated whether the expression of programmed death-ligand 1 (PD-L1) and the density of tumor-infiltrating mononuclear cells (TIMC) predict the occurrence of resistance, hence affecting the clinical outcome in BRAFi-treated MMP. PD-L1 expression (cutoff 5%) was analyzed by immunohistochemistry with two different antibodies in BRAF(V600)-mutated formalin-fixed and paraffin-embedded samples from 80 consecutive MMP treated with BRAFi at a single institution. TIMC were evaluated by conventional hematoxylin and eosin staining. Forty-six and 34 patients received vemurafenib and dabrafenib, respectively. Membranous expression of PD-L1 was detected in 28/80 (35%) of patients. At multivariate analysis, absence of tumoral PD-L1 staining [odd ratio (OR) 10.8, 95% confidence interval (CI) 2.7-43.3, P < 0.001] and the presence of TIMC (OR 6.5, 95% CI 1.7-24.3, P < 0.005) were associated with a better response to treatment. Median progression-free survival (PFS) and overall survival were 10 and 15 months, respectively. By multivariate assessment, PD-L1 expression [hazard ratio (HR) 4.3, 95% CI 2.1-8.7, P < 0.0001] and absence of TIMC (HR 2.5, 95% CI 1.4-4.7, P < 0.002) correlated with shorter PFS. PD-L1 overexpression (HR 6.2, 95% CI 2.8-14.2, P < 0.0001) and absence of TIMC (HR 3.1, 95% CI 1.5-6.5, P < 0.002) were independent prognostic factors for melanoma-specific survival. Our results provide the first proof-of-principle evidence for the predictive and prognostic relevance of PD-L1 immunohistochemical expression and density of immune cell infiltration in BRAF(V600)-mutated MMP treated with BRAFi.