Urban agriculture (UA) is increasingly recognized in policy and academic discussions for its potential to promote sustainable food systems and reduce food insecurity. Due to their proximity to citizens, local governments are well-positioned to advance these initiatives. However, the factors that drive governments in densely populated cities to develop UA policies remain relatively understudied, especially in the Global South. To address this gap, we employ a comparative case study approach based on key informant interviews and documents to examine how local government actors pursue UA policies in the Brazilian cities of Recife, Rio de Janeiro, and Curitiba. We find that certain municipal bureaucrats act as “policy entrepreneurs,” emerging as pivotal figures in creating, maintaining, and adapting municipal UA policies in Brazilian cities. These policy entrepreneurs use a number of strategies to advance their policy preferences, secure resources, and legitimize their actions within the public administration. These approaches include collaborating with civil society, forging partnerships within and outside of government, framing their proposals within international policy guidelines, and leveraging media coverage and external recognition. In doing so, policy entrepreneurs shape UA policies by introducing new programs, making them resilient to changes related to electoral turnover, and diversifying initiatives from direct government support for gardeners to, for example, incorporating UA into urban planning regulations. This article thus provides valuable insights for policymakers and underscores the crucial role of local government bureaucrats, particularly those acting as policy entrepreneurs, in shaping policies that contribute to making cities sustainable.