Digital transformation, based on digital technologies, has triggered economic growth in many industries and brought about production and service transformation in the manufacturing sector. As an important source of innovation output and a driving force for national economic development, it is of great significance to study the impact of digital transformation on innovation output in manufacturing companies. This study analyzes the effects of digital transformation on the quality, quantity, and overall innovation output of manufacturing companies from both the macro provincial-level digital transformation and micro enterprise-level digital transformation perspectives. Additionally, using data from manufacturing companies listed on the Shanghai and Shenzhen stock exchanges from 2012 to 2022, this study empirically tests the mechanism through which digital transformation affects innovation output from the perspectives of internal transaction costs and external transaction costs. The results show that digital transformation promotes overall improvement in innovation output of manufacturing companies and leads to improvements in both the quality and quantity of innovation output. Furthermore, the study finds that the effect of digital transformation on innovation output has a nonlinear characteristic under different levels of market competitiveness and market freedom. The mediation analysis reveals that the influence of digital transformation on innovation output can be attributed to the reduction of internal transaction costs and the enhancement of external transaction efficiency. In terms of digital policy formulation, it is necessary to coordinate the development of diverse and innovative digital infrastructure at the macro level with the micro-level ecosystems of enterprises, in order to reduce transaction costs within and outside innovative entities. Ultimately, it is essential for the government to foster a conducive free market environment that enhances transaction efficiency and timely regulates the excessive competition resulting from oligopolistic monopolies, thus maximizing the potential of digital transformation in promoting innovation output.