With the rapid development of the digital economy and the increasingly severe environmental issues, the role of the digital economy in green innovation has been attracting more attention; however, only a limited amount of research has been done in this area. Therefore, based on matching data at the city and manufacturing enterprise level in China during 2011–2018, this paper attempted to integrate the digital economy (more specifically, the Internet and digital finance) with resource allocation and green technology innovation together in a unified scheme. Our study confirmed that the digital economy could significantly promote green technology innovation by manufacturing enterprises, but that digital finance was the dominant feature. Resource allocation efficiency played a partial mediating role between digital economy and green technology innovation. Furthermore, considering the heterogeneity in enterprise ownership and industrial pollution, the digital economy had a more positive effect on green technology innovation in state-owned enterprises (SOEs) and high pollution industries. As for the heterogeneity of region, the Internet significantly contributed to green technology innovation in regions with different levels of development. In the eastern region of China, especially, the influence of digital finance on green technology innovation was more significant. In view of these findings, this study provides important insights for strengthening the integration of the digital economy with green transformation, emphasizing the rationality of resource allocation, and formulating policies for different enterprises.