As the global pharmaceutical market continues to expand, the demand for pharmaceutical supply chain is increasing. In the context of “Industry 4.0”, the pharmaceutical supply chain sector needs to accelerate digital construction. Pharmaceutical companies need to strengthen risk management in order to cope with supply disruptions. From the perspective of sustainable development, the pharmaceutical supply chain can achieve sustainable supply performance in social, economic and environmental dimensions through digital transformation. There is a lack of research on digital transformation of pharmaceutical supply chain management. Further research is needed on what specific digital management pharmaceutical companies need to enhance to improve supply performance. This study uses empirical analysis to examine the impact of digital transformation on sustainable supply chain performance and to explore the role of information sharing and traceability as mediators. The aim is to guide the pharmaceutical supply chain to clearly manage the development of digital transformation and obtain sustainable supply performance. This study presents hypotheses based on cutting-edge theoretical findings. In total, 298 Chinese pharmaceutical company supply chain managers were surveyed and Structural equation analysis was conducted using SPSS26.0 and AMOS24.0. The results show that digital transformation significantly and positively impacts sustainable supply chain performance. Traceability plays a mediating role. The mediating role of information sharing is not significant. However, information sharing and traceability as two separate trends can have synergistic effects that together affect sustainable supply performance. The conclusion is that the pharmaceutical supply chain should accelerate digital construction, eliminate the uneven development of digital technology among supply chain members, and reduce the impact of technological uncertainty on performance. Companies are enhancing supply chain security management through information sharing and traceability systems, and are continuously focusing on the role of digital transformation as a driver for sustainable development.