PurposeThis study aims to examine the impact of China's “Manufacturing and Internet Integration Development Pilot Demonstration Project” (MIP) policy on the digital transformation (DT) and labor structure optimization (LSU) of manufacturing enterprises, reveal the relationship between DT and LSU at the micro level and investigate the mechanism between them.Design/methodology/approachThis study employs MIP as a quasi-natural experiment and develops a time-varying difference-in-difference (DID) model based on a sample of 2,445 Chinese A-share listed manufacturing enterprises in the Shanghai and Shenzhen markets from 2013 to 2021.FindingsThe implementation of MIP significantly increases DT by 0.4366 and optimizes LSU by 0.0507. By enhancing the two mediated variables of organizational learning inputs (SI) and employees' personal digital cognition (PDC), DT can optimize the LSU of pilot enterprises by 0.035 and 0.034, according to the results of the mechanism analysis. The study also reveals that the impact of MIP on LSU is highly heterogeneous. With effects of 0.0691 and 0.0632, the optimization effect is more pronounced in state-owned firms and firms with low ownership concentration, respectively.Originality/valueThis study demonstrates the dual effects of the MIP pilot on DT and LSU. In addition, this study pioneers research on the significance of optimizing the labor structure through SI and PDC on the basis of DT, which provides an empirical foundation for the Chinese Government to expand the scope of MIP pilots and revise policy content, as well as for manufacturing enterprises to upgrade the labor structure.