Purpose This study aims to examine the impact of corporate social responsibility (CSR) on customer-based brand equity (CBBE), with a focus on the mediating role of customer value cocreation (CVCC). The objective is to understand the direct and indirect links between CSR and the dimensions of CBBE (image, quality, awareness, loyalty) in the context of the luxury hotel industry, thus filling existing gaps. Design/methodology/approach This quantitative study of luxury hotel guests in Morocco used a questionnaire. After a pilot study with 10 professionals, the final version was administered, generating 204 valid responses. Purposive convenience sampling was chosen. PLS analysis was favored. Findings The results highlight the significant influence of CSR on the four dimensions of CBBE. Likewise, CVCC exerts a significant effect on CBBE aspects, except for brand loyalty. CVCC partially mediates the relationship between CSR and brand image, perceived quality and brand awareness. However, it does not have a significant mediating role in the CSR−brand loyalty relationship. Research limitations/implications The study, despite its contributions, is limited to the luxury hotel industry in Morocco, raising concerns of external validity. Future research should diversify service contexts and explore the multidimensionality of CSR. Practical implications Luxury hotel managers should prioritize authentic communication to optimize their CBBE through CVCC. An inclusive and strategic approach to cocreation is essential to strengthen the impact of CSR on CBBE. Integrating CSR into customer touchpoints and human resources policies is crucial. Originality/value This study, to the best of the authors’ knowledge, enriches understanding of the complex interactions between CSR, CVCC and CBBE in Morocco and North Africa. Its originality lies in its exclusive contribution to the region’s marketing literature, broadening the field of knowledge. By exploring these relationships in the specific context of the region, it offers new perspectives to researchers and practitioners interested in CSR, CVCC and CBBE.