Agents targeting the endocannabinoid system (ECS) have gained attention as potential cancer treatments. Given recent evidence that cannabinoid receptor 2 (CB2R) regulates lymphocyte development and inflammation, we performed studies on CB2R in the immune response against melanoma. Analysis of The Cancer Genome Atlas (TCGA) data revealed a strong positive correlation between CB2R expression and survival, as well as B cell infiltration in human melanoma. In a murine melanoma model, CB2R expression reduced the growth of melanoma as well as the B cell frequencies in the tumor microenvironment (TME), compared to CB2R-deficient mice. In depth analysis of tumor-infiltrating B cells using single-cell RNA sequencing suggested a less differentiated phenotype in tumors from Cb2r−/− mice. Thus, in this study, we demonstrate for the first time a protective, B cell-mediated role of CB2R in melanoma. This gained insight might assist in the development of novel, CB2R-targeted cancer therapies.