PurposeThis investigation endeavors to examine the routes by which environmental–social–governance (ESG) performance influences the competitive landscape for logistics enterprises, with a particular emphasis on the function of digitalization in this complex process. The research underscores the significance of the ESG context in the realm of digitalization, providing valuable insights into its impact on the overall competitiveness of logistics enterprises.Design/methodology/approachThis research gathers information from a total of 90 logistics enterprises that are publicly traded on the Shanghai and Shenzhen A-share stock markets for analysis and model testing. Due to the multiple pathways of influence and the constrained size of the sample, it has been decided that the Piecewise structural–equation–modeling (SEM) approach will be employed.FindingsThe research reveals that ESG factors positively impact enterprises' competitiveness (EC). The augmentation of competitiveness is attributed to the moderating role of green technology innovation (GTI) and agency costs between ESG and EC. In the context of digitalization, the level of digitalization of logistics enterprises may create a capital squeeze effect on environmental performance, weakening competitiveness. Conversely, the level of digitalization positively regulates the promoting effect of governance performance on competitiveness.Originality/valueThis research provides a sound theoretical foundation for understanding how ESG contributes to boosting the competitiveness of Chinese logistics enterprises and extends the application of Piecewise SEM in the research field of logistics enterprise competitiveness. Furthermore, it offers a practical pathway for companies to implement ESG practices and foster competitiveness in digital environments.