Purpose: In the context of fresh food e-commerce, this study investigates the intermediary mechanisms between last-mile logistics service quality (LMLSQ) and customer loyalty. Utilizing the Quality-Value-Loyalty chain as a framework, it focuses on how perceived functional and emotional value mediate this relationship. Research design, data and methodology: Data was gathered through questionnaires from Chinese customers who purchased fresh products from fresh food e-commerce platforms which provide self-delivery services. Partial least squares structural equation modeling (PLS-SEM) was used to examine the proposed hypotheses after confirmatory factor analysis (CFA) revealed the validity and reliability of the data. Results: The findings reveal that condition quality and personnel contact quality positively influence both functional and emotional value, which, in turn, significantly impact customer loyalty. Timeliness quality, however, does not significantly affect functional or emotional value, indicating its limited impact on customer loyalty. Conclusions: The study confirms that improving condition quality and personnel contact quality significantly boosts customer loyalty by enhancing perceived functional and emotional value. The findings highlight the importance for fresh food e-commerce platforms to offer high-quality, reliable, and emotionally satisfying LMLSQ. The results offer practical insights for e-commerce platforms to focus on specific service quality dimensions to foster customer loyalty and contribute to the theoretical understanding of the quality-value-loyalty framework.