This study investigates the impact of smart city pilot policies on the innovation activities of 3,417 listed companies in 246 prefecture-level and above cities in China. Utilising patent applications and granted patent data from listed companies between 2004 and 2019, we employ the staggered difference-in-differences (DID) method to examine the influence of smart city policies on corporate innovation output. Our research results indicate that the implementation of smart city policies significantly promotes innovation among listed companies in the policy pilot cities. Through a series of robustness tests, including parallel trend tests, placebo tests, and instrumental variable methods, we reaffirm the robustness of this effect. Mechanism tests reveal that increasing local government investment in science and technology, easing corporate financing constraints, and fostering competition among industries are effective ways through which smart city policies stimulate innovation. However, a mere increase in government subsidies to enterprises does not necessarily drive innovation and may even inhibit it when subsidy levels exceed a certain threshold. Therefore, judicious and reasonable direct subsidies are essential for fostering corporate innovation. Additionally, from the perspectives of enterprise and city characteristics, we capture the heterogeneity of policy effects. Non-state-owned enterprises, small enterprises, growing enterprises, and enterprises in underdeveloped regions significantly enhance their overall innovation capabilities under the smart city initiatives. For state-owned enterprises in underdeveloped cities, policy effects drive higher-quality innovation.