The construction industry is in urgent need to transition away from its rough development and management practices. It is essential to embrace a sustainable development path to enhance core competitiveness, promote resource intensification, and prioritize environmental friendliness. The digital transformation uses information and data as the key elements to promote the transformation of traditional industries to become more intelligent and green. This ushers in new opportunities for transformation in the construction industry, marking a significant turning point for its evolution. This paper explores the impact of digital transformation on the green development of construction companies and its inner mechanism. Based on the panel data of the listed companies in China’s construction industry from 2015 to 2021, the two-way fixed effect, mediating effect, moderating effect, and threshold effect models are used to test the relationship between them. The results indicate that digital transformation significantly promotes the green development of construction companies. Additionally, this result still holds after robustness and endogeneity tests. This effect is more significant in state-owned, larger companies situated in regions with weaker digital economy development. In addition, the intensity of regional environmental regulations strengthens the impact of digital transformation on green development. However, it has a threshold effect. In the test of mediating effect, it has been found that green innovation and corporate human capital structure can serve as mediators. In the general trend of digital change, the drive towards the sustainable development of construction companies offers micro-empirical evidence that the digital economy empowers green development in China.