Green supply chain integration (GSCI) has emerged as a significant technique for improving sustainable performance by promoting collaboration with supply chain partners and breaking down organizational barriers to utilize complementary resources. This study investigates the relationships among GSCI, supply chain agility (SCA), digital orientation (DO), and sustainable performance, grounded in the Natural Resource-Based View (NRBV) and Contingency Theory (CT), based on survey data from 288 Chinese pharmaceutical manufacturing enterprises. Using mediation, moderation, and moderated mediation analyses, the findings indicate that SCA serves as a mediator between GSCI and sustainable performance. Significantly, DO strengthens both the direct effect of SCA on sustainable performance and the overall mediating pathway; nevertheless, it does not substantially boost the association between GSCI and SCA. This study’s innovation lies in elucidating the significance of GSCI as a resource for sustainable performance within the pharmaceutical enterprises, while further delineating the pathways and contingent elements for achieving sustainable performance in a digital context. This study offers valuable implications for both academic research and managerial practice