Mutualistic interactions between species underpin biodiversity and ecosystem function, but may be lost when partners respond differently to abiotic conditions. Except for a few prominent examples, effects of global anthropogenic change on mutualisms are poorly understood. Here we assess the effects of urbanization on a symbiosis in which the plant Cordia nodosa house ants in hollow structures (domatia) in exchange for defense against herbivores. We expected to find that mutualist ants would be replaced in the city by heat-tolerant opportunists, leaving urban plants vulnerable to herbivory. In five protected forest sites and five urban forest fragments in southeast Perú, we recorded the identity and heat tolerance (CTmax) of ant residents of C. nodosa. We also assayed their plant-defensive behaviors and their effects on herbivory. We characterized the urban heat-island effect in ambient temperatures and within domatia. Forest plants housed a consistent ant community dominated by three specialized plant ants, whereas urban plants housed a suite of 10 opportunistic taxa that were, collectively, about 13 times less likely than forest ants to respond defensively to plant disturbance. In the forest, ant exclusion had the expected effect of increasing herbivory, but in urban sites, exclusion reduced herbivory. Despite poor ant defense in urban sites, we detected no difference in total standing herbivory, perhaps because herbivores themselves also declined in the city. Urban sites were warmer than forest sites (daily maxima in urban domatia averaged 1.6°C hotter), and the urban ant community as a whole was slightly more heat tolerant. These results illustrate a case of mutualism loss associated with anthropogenic disturbance. If urbanization is representative of increasing anthropogenic stressors more broadly, we might expect to see destabilization of myrmecophytic mutualisms in forest ecosystems in the future.