This study examines the impact of the government-business relations on urban greening investments in major Chinese cities. We find that the government-business index (GBI) is positively related to urban greening construction. However, the corruption sub-index within the GBI shows a negative relationship, suggesting the risk of vanity projects that prioritize officials’ visibility over genuine sustainability. Notably, the presence of hometown mayors weakens the positive effect of the GBI on urban greening construction. Moreover, while the GBI is associated with a reduction in green total factor productivity (GTFP), hometown mayors are shown to enhance GTFP, highlighting their significant roles in promoting sustainable urban development.